LOGIN(1) COMMAND REFERENCE LOGIN(1)
NAME
login - sign on
SYNOPSIS
login [ username ]
DESCRIPTION
The login command is used at the beginning of each terminal
session and allows the user to identify himself to the
system. It may be invoked by the user as a command, or by
the system when a connection is first established. Also, it
is invoked by the system when a previous user has terminated
the initial shell by typing end-of-file.
If login is invoked without the argument username, 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.
If a user does not complete the login successfully within a
certain period of time (e.g., one minute), he is likely to
be silently disconnected.
After a successful login, accounting files are updated, the
user is informed of the existence of mail, and the message
of the day and the time of the user's last login is printed.
This output to the user is suppressed if a file named
.hushlogin is in the user's home directory. (This feature
is mostly used to make life easier for non-human users, such
as uucp.)
Login initializes the user and group IDs and the working
directory, then executes a command interpreter (usually
sh(1sh) or csh(1csh)) according to specifications found in a
password file. Argument 0 of the command interpreter is the
name of the command interpreter with a leading dash ("-")
prepended.
Login also initializes the basic environment (see
environ(7)) with information specifying home directory,
command interpreter, command search path, terminal type (if
available), user name and mail directory. The environment
is initialized to:
HOME=your-login-directory
SHELL=last-field-of-passwd-entry
PATH=:/bin:/usr/bin
TERM=first-field-of-ttytype-entry
Printed 10/17/86 1
LOGIN(1) COMMAND REFERENCE LOGIN(1)
If the file /etc/nologin exists login prints its contents on
the user's terminal and exits. This is used by shutdown(8)
to stop users logging in when the system is about to go
down.
Login is recognized by sh(1sh) and csh(1csh) and executed
directly (without forking).
FILES
/etc/utmp accounting
/usr/adm/wtmp accounting
/usr/adm/lastlog accounting
/usr/spool/mail/* mail
/etc/motd message-of-the-day
/etc/passwd password file
/etc/ttytype ttytype file
/etc/nologin stops logins
.hushlogin makes login quieter
/etc/securetty lists ttys that root may log in on
DIAGNOSTICS
Login incorrect
The name or the password is bad.
No Shell No directory
The /etc/passwd entry is not set up correctly for this
user, and there may be no home directory as well. See a
system administrator.
RETURN VALUE
[NO_ERRS] Command completed without error.
[NP_WARN] An error warranting a warning message
occurred. Execution continues.
[P_WARN] A system error occurred. Execution continues.
See intro(2) for more information on system
errors.
CAVEATS
An undocumented option, -r is used by the remote login
server, rlogind(8n) to force login to enter into an initial
connection protocol.
Printed 10/17/86 2
LOGIN(1) COMMAND REFERENCE LOGIN(1)
SEE ALSO
mail(1mh), passwd(1), passwd(5), environ(7), init(8),
getty(8), shutdown(8).
Printed 10/17/86 3
%%index%%
na:72,51;
sy:123,112;
de:235,2365;2744,422;
fi:3166,698;
di:3864,414;
rv:4278,414;
ca:4692,261;
se:5097,285;
%%index%%000000000142