.TH LOGIN 1 .UC .SH NAME login \- sign on .SH SYNTAX .B login [ username ] .br .B login [ username.groupname ] .SH DESCRIPTION The .I 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 latter case is summarized above and described below. .PP If .I login is invoked without an argument, it asks for a user name, and, if appropriate, a password. Echoing is turned off (if possible) during the typing of the password, so it will not appear on the written record of the session. .PP After a successful \fIlogin\fP, accounting files are updated and the user is informed of the time and terminal he last logged in on. The message of the day is displayed, followed by any .I .broadcast files in the directories leading to the user's home directory. If there is a .I .reminder file in the user's home directory, it will be printed. Finally, \fIlogin\fP notifies the user if there is mail in his mailbox. .I login initializes the user and group IDs and the working directory, and sets the HOME, PATH, TERM, SHELL and USER environment variables. It then executes a command interpreter (usually \fIsh\fP\|(1) or \fIcsh\fP\|(1)), according to specifications found in a password file. If the command interpreter is .IR /bin/csh , the new line discipline is entered, otherwise the terminal stop characters are set to be undefined (see .IR stty (1). Argument 0 of the command interpreter starts with a `\-'. .PP \fILogin\fP is recognized by \fIsh\fP\|(1) and \fIcsh\fP\|(1) and executed directly (without forking). .PP During special session (see \fIinit\fP\|(8)), \fIlogin\fP does not allow any logins of normal users. Also, if the file .I /etc/nologin exists, that message is displayed and the login is not allowed if the user is not superuser. .SH FILES \".nr 00 \w'/usr/spool/mail/*\ \ ' \".if \w'/usr/adm/wtmp\ \ '>\n(00 .nr 00 \w'/usr/adm/wtmp\ \ ' \".ta \n(00u .ta 2i /etc/utmp accounting .br /usr/adm/wtmp accounting .br /usr/spool/mail/* mail .br /etc/motd message-of-the-day .br /etc/nologin message inhibiting new logins .br /etc/passwd password file .SH "SEE ALSO" Mail(1), mail(1), newgrp(1), passwd(1), environ(5), passwd(5), getty(8), init(8), shutdown(8) .SH DIAGNOSTICS `Login incorrect', if the name or the password is bad, or if a group was specified and the user is not a member of the named group. .br `No shell', `cannot open password file', `no directory': consult a programming counselor. .br `Sorry. You cannot login at this time', if UNIX is running in special session. .SH BUGS Changes the login name of a user when invoked from a shell. Many systems do not allow its use in this way, for that reason. .br It is not possible to use a login name with an embedded `.' if the `name.group' syntax is allowed.