1LOGIN(1)                    General Commands Manual                   LOGIN(1)
2
3
4

NAME

6       login - sign on
7

SYNOPSIS

9       login [ -p ] [ username ]
10

DESCRIPTION

12       The  login command is used when a user initially signs on, or it may be
13       used at any time to change from one user to another.  The  latter  case
14       is  the  one  summarized  above  and  described  here.  See “How to Get
15       Started” for how to dial up initially.
16
17       If login is invoked without an argument, it asks for a user name,  and,
18       if appropriate, a password.  Echoing is turned off (if possible) during
19       the typing of the password, so it will not appear on the written record
20       of the session.
21
22       After  a successful login, accounting files are updated and the user is
23       informed of the existence of mail.  The message of the day is  printed,
24       as  is  the  time  of  his last login.  Both are suppressed if he has a
25       “.hushlogin” file in his home directory; this is mostly  used  to  make
26       life easier for non-human users, such as uucp.
27
28       Login  initializes  the  user  and group IDs and the working directory,
29       then executes a command interpreter (usually csh(1)) according to spec‐
30       ifications  found in a password file.  Argument 0 of the command inter‐
31       preter is the name of the  command  interpreter  with  a  leading  dash
32       (“-”).
33
34       Login  also modifies the environment environ(7) with information speci‐
35       fying home directory, command interpreter, terminal type (if available)
36       and  user name.  The `-p' argument causes the remainder of the environ‐
37       ment to be preserved, otherwise any previous environment is discarded.
38
39       If the file /etc/nologin exists,  login  prints  its  contents  on  the
40       user's  terminal  and  exits. This is used by shutdown(8) to stop users
41       logging in when the system is about to go down.
42
43       Login is recognized by sh(1) and csh(1) and executed directly  (without
44       forking).
45

FILES

47       /var/run/utmp      accounting
48       /usr/adm/wtmp      accounting
49       /usr/spool/mail/*  mail
50       /etc/motd          message-of-the-day
51       /etc/passwd        password file
52       /etc/nologin       stops logins
53       .hushlogin         makes login quieter
54

SEE ALSO

56       init(8),  getty(8),  mail(1),  passwd(1),  passwd(5), environ(7), shut‐
57       down(8), rlogin(1c)
58

DIAGNOSTICS

60       “Login incorrect,” if the name or the password is bad.
61       “No Shell”, “cannot open password file”, “no directory”: consult a pro‐
62       gramming counselor.
63

BUGS

65       An  undocumented  option,  -r  is  used  by  the  remote  login server,
66       rlogind(8C) to force login to enter into an initial  connection  proto‐
67       col.  -h is used by telnetd(8C) and other servers to list the host from
68       which the connection was received.
69
70
71
724th Berkeley Distribution      November 27, 1996                      LOGIN(1)
Impressum