LOGIN(1) UNIX Programmer's Manual LOGIN(1) NAME login - sign on SYNTAX login [ username ] login [ username.groupname ] DESCRIPTION The _l_o_g_i_n 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. If _l_o_g_i_n 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. After a successful _l_o_g_i_n, 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 ._b_r_o_a_d_c_a_s_t files in the directories leading to the user's home directory. If there is a ._r_e_m_i_n_d_e_r file in the user's home directory, it will be printed. Finally, _l_o_g_i_n notifies the user if there is mail in his mailbox. _l_o_g_i_n 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 _s_h(1) or _c_s_h(1)), according to specifications found in a password file. If the command interpreter is /_b_i_n/_c_s_h, the new line discipline is entered, otherwise the terminal stop charac- ters are set to be undefined (see _s_t_t_y(1). Argument 0 of the command interpreter starts with a `-'. _L_o_g_i_n is recognized by _s_h(1) and _c_s_h(1) and executed directly (without forking). During special session (see _i_n_i_t(8)), _l_o_g_i_n does not allow any logins of normal users. Also, if the file /_e_t_c/_n_o_l_o_g_i_n exists, that message is displayed and the login is not allowed if the user is not superuser. FILES /etc/utmp accounting /usr/adm/wtmp accounting /usr/spool/mail/* mail /etc/motd message-of-the-day /etc/nologin message inhibiting new logins /etc/passwd password file SEE ALSO Mail(1), mail(1), newgrp(1), passwd(1), environ(5), Printed 7/25/83 1 LOGIN(1) UNIX Programmer's Manual LOGIN(1) passwd(5), getty(8), init(8), shutdown(8) 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. `No shell', `cannot open password file', `no directory': consult a programming counselor. `Sorry. You cannot login at this time', if UNIX is running in special session. 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 rea- son. It is not possible to use a login name with an embedded `.' if the `name.group' syntax is allowed. Printed 7/25/83 2