BSD 4_1c_2 release
[unix-history] / usr / man / man1 / login.1
CommitLineData
8f69e361
C
1.TH LOGIN 1 "1 April 1981"
2.UC 4
3.SH NAME
4login \- sign on
5.SH SYNOPSIS
6.B login
7[ username ]
8.SH DESCRIPTION
9The
10.I login
11command
12is used when a user initially
13signs on, or it may be used at any time to change
14from one user to another.
15The latter case is the one summarized above and
16described here.
17See \*(lqHow to Get Started\*(rq for how to dial up initially.
18.PP
19If
20.I login
21is invoked without an argument,
22it asks for a user name, and, if
23appropriate, a password.
24Echoing is turned off (if possible) during the typing of the password,
25so it will not appear on the written record of the
26session.
27.PP
28After a successful login,
29accounting files are updated and
30the user is informed of the
31existence of mail,
32and
33the message of the day is printed,
34as is the time he last logged in (unless he has a \*(lq.hushlogin\*(rq
35file in his home directory \- this
36is mostly used to make life easier for non-human users, such as
37.IR uucp ).
38.PP
39.I Login
40initializes the user and group IDs and the working directory,
41then executes a command interpreter (usually
42.IR sh (1))
43according to specifications found in a password file.
44Argument 0 of the command interpreter is \*(lq\-sh\*(rq, or
45more generally the name of the command interpreter with
46a leading dash (\*(lq\-\*(rq) prepended.
47.PP
48Login also initializes the
49environment
50.IR environ (5)
51with information specifying home directory, command interpreter, terminal
52type (if available) and user name.
53.PP
54If the file /etc/nologin exists
55.I login
56prints its contents on the user's terminal and exits. This is
57used by
58.IR shutdown (8)
59to stop users logging in when the system is about to go down.
60.PP
61Login is recognized by
62.IR sh (1)
63and
64.IR csh (1)
65and executed directly (without forking).
66.SH FILES
67.ta \w'/usr/spool/mail/*\ \ 'u
68/etc/utmp accounting
69.br
70/usr/adm/wtmp accounting
71.br
72/usr/spool/mail/* mail
73.br
74/etc/motd message-of-the-day
75.br
76/etc/passwd password file
77.br
78/etc/nologin stops logins
79.br
80\&.hushlogin makes login quieter
81.br
82/etc/securetty lists ttys that root may log in on
83.SH "SEE ALSO"
84init(8), newgrp(1), getty(8), mail(1), passwd(1), passwd(5), environ(5),
85shutdown(8)
86.SH DIAGNOSTICS
87\*(lqLogin incorrect,\*(rq
88if the name or the password is bad.
89.br
90\*(lqNo Shell\*(rq, \*(lqcannot open password file\*(rq,
91\*(lqno directory\*(rq:
92consult a programming counselor.
93.SH BUGS
94An undocumented option,
95.B \-r
96is used by the remote login server,
97.IR rlogind (8C)
98to force
99.I login
100to enter into an initial connection protocol.