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