LOGIN(1) — UNIX Programmer’s Manual
NAME
login − sign on
SYNOPSIS
login [ username ]
DESCRIPTION
The login command is used when a user initially signs on, or it may be used at any time to change from one user to another. The login script begins to run when a Control-d is given to the single-user (#) prompt after booting the system. For further details on initial login, see "How to Get Started" in the Introduction to this volume.
If login is invoked without an argument, it responds with the
login:
prompt, and it expects a valid user name, and, if appropriate, a password. It will not ask for a password unless passwords exists for the user.
Echoing is turned off during the typing of the password, so that the password will remain secure.
After a successful login, accounting files are updated and the user is informed of the existence of mail, and the message of the day (motd) is printed, as is the time s/he last logged in.
Login initializes the user and group IDs and the working directory, then executes a command interpreter (usually csh(1)) according to specifications found in a password file. Argument 0 of the command interpreter is “−csh”, the name of the command interpreter with a leading dash (“−”) attached.
Login also initializes the environment environ(5) with information specifying home directory, command interpreter, terminal type (if available) and user name.
Login is recognized by sh(1) and csh(1) and executed directly (without forks).
EXAMPLE
login
causes the system to give the prompt,
login:
to which a user name is the appropriate response.
FILES
/etc/utmpaccounting
/usr/adm/wtmpaccounting
/usr/spool/mail/*mail
/etc/motdmessage-of-the-day
/etc/passwdpassword file
SEE ALSO
environ(5), getty(8), init(8), mail(1), passwd(1), passwd(5),
DIAGNOSTICS
“Login incorrect,” if the name or the password is bad.
“No Shell”, “cannot open password file”,
“No Directory”: check system integrity, or reboot and try again.
7th Edition — 1/19/82