|
|
login cannot be invoked from a shell. Instead, it is placed in a port monitor's administrative file by the system administrator and is invoked by the port monitor, typically ttymon. (See ttymon(1M) and pmadm(1M).)
When login is invoked by the port monitor, a prompt appears. The minimum response is a login name. Other possible options and parameters are outlined below.
If appropriate, login may ask for a password. Where possible, echoing is turned off while the password is typed so the password does not appear on the written record of the session. If the -p option has been included, login invokes the passwd command. (See passwd(1).) If the LOGIN_ONLY keyword is set in the password default file, this use of the -p option is the only way a user can change passwords.
At some installations, you may be required to enter a dialup password for dialup connections, as well as a login password. In this case, the prompt for the dialup password will be ``Dialup Password:''.
If you do not complete the login successfully within a certain period of time (see defadm(1M)), you are likely to be silently disconnected.
The following arguments and options may be entered in response to the login prompt.
The basic environment is initialized to:
HOME=your_login_directory LOGNAME=your_login_name MAIL=/var/mail/your_login_name PATH=/usr/bin SHELL=last_field_of_passwd_entry # (/bin/sh if the field is empty) TZ=timezone_specificationThe environment may be expanded or modified by supplying additional arguments when login prints the prompt requesting the user's login name. The arguments may take either of two forms: xxx or xxx=yyy. Arguments without an equal sign are placed in the environment as
Ln=xxxwhere n is a number that starts at 0 and is incremented each time a new variable name is required. Variables containing ``='' are placed in the environment without modification. If such a variable is already defined, the new value replaces the old value. To prevent users who log in to restricted shell environments from spawning secondary shells that are not restricted, the following environment variables cannot be changed:
HOME IFS LOGNAME PATH SHELL
If the authentication performed by
the login authentication scheme,
/usr/lib/iaf/login/scheme, is successful, the scheme
pushes the following information onto a STREAMS
module and returns control to the port monitor:
AUDITMASK
GID
GIDCNT (group count)
HOME
HZ
LOGNAME
PATH
SGID (supplementary group list)
SHELL
TTY
TZ
UID
ULIMIT
The port monitor then calls set_id and set_env, which use this information to set the user's identity and environment.
After a successful login, accounting files are updated,
the time you last logged
in is printed, and (if appropriate)
your current level is printed.