login Command login
Log in or change user name
login [username]
The COHERENT system normally invokes login as part of the log in
sequence on an unused terminal. The user may also invoke login
directly from the shell sh, usually to change to a different user
name. If username is not present, login prompts the user. If
the account has a password, login asks for it.
If the user logs in successfully, login then reads the file
/etc/motd (which holds the ``message of the day'') and prints its
contents on the screen, then notifies the user if mail is
waiting to be read. It then sets the working directory to the
user's base directory and sets the user id and group id, trans-
fers ownership of the tty to the user, and updates the login ac-
counting file. Finally, if a program is specified in
/etc/passwd, login reads /etc/profile for lines beginning ``ex-
port'', inserts the remainder of the line into the environment,
then executes the specified program. If the program field is
blank, login executes sh, which executes the contents of
$HOME/.profile if it is present.
From the shell, a user may log in by typing login or by typing an
end of file (normally <ctrl-D>) to terminate the previous shell.
When the superuser root logs in, login sets HOME to `/' and reads
the file /.profile should one exist.
***** Files *****
/etc/logmsg -- Login message (default, ``Coherent login:'')
/etc/passwd -- User information
/etc/profile -- System profile
/etc/motd -- Message of the day
/etc/utmp -- Users currently using system
/usr/adm/wtmp -- Login accounting history
/usr/adm/failed -- Log of failed login attempts
$HOME/.profile -- User profile
***** See Also *****
ac, commands, getty, sh, su, utmp.h
COHERENT Lexicon Page 1