Commit | Line | Data |
---|---|---|
55890414 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
c61c79a1 | 5 | .\" @(#)login.1 6.6 (Berkeley) %G% |
55890414 | 6 | .\" |
06ae098a | 7 | .TH LOGIN 1 "" |
55890414 KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | login \- sign on | |
11 | .SH SYNOPSIS | |
12 | .B login | |
7ed14798 MK |
13 | [ |
14 | .B \-p | |
15 | ] [ username ] | |
16 | .br | |
17 | .B login | |
18 | [ | |
19 | .B \-p | |
20 | ] [ | |
21 | .B \-h | |
22 | hostname | |
23 | ] [ | |
24 | .B \-f | |
25 | ] [ | |
26 | username | |
27 | ] | |
55890414 KM |
28 | .SH DESCRIPTION |
29 | The | |
30 | .I login | |
31 | command | |
32 | is used when a user initially | |
7ed14798 MK |
33 | signs on. |
34 | It may also be used at any time to change | |
55890414 | 35 | from one user to another. |
7ed14798 MK |
36 | This case is the one summarized first above and described here. |
37 | See \*(lqHow to Get Started\*(rq for how to connect initially. | |
38 | The invocation of | |
39 | .I login | |
40 | for initial sign-on | |
41 | is made by a system program or server using the latter form of the command | |
42 | and is described below. | |
55890414 KM |
43 | .PP |
44 | If | |
45 | .I login | |
46 | is invoked without an argument, | |
47 | it asks for a user name, and, if | |
48 | appropriate, a password. | |
49 | Echoing is turned off (if possible) during the typing of the password, | |
50 | so it will not appear on the written record of the | |
51 | session. | |
52 | .PP | |
53 | After a successful login, | |
54 | accounting files are updated and | |
55 | the user is informed of the | |
678ce1ab MK |
56 | existence of mail. |
57 | The message of the day is printed, | |
58 | as is the time of his last login. | |
59 | Both are suppressed if he has a \*(lq.hushlogin\*(rq | |
60 | file in his home directory; this | |
55890414 | 61 | is mostly used to make life easier for non-human users, such as |
678ce1ab | 62 | .IR uucp . |
55890414 KM |
63 | .PP |
64 | .I Login | |
65 | initializes the user and group IDs and the working directory, | |
66 | then executes a command interpreter (usually | |
678ce1ab | 67 | .IR csh (1)) |
55890414 | 68 | according to specifications found in a password file. |
678ce1ab MK |
69 | Argument 0 of the command interpreter is |
70 | the name of the command interpreter with | |
71 | a leading dash (\*(lq\-\*(rq). | |
55890414 | 72 | .PP |
06ae098a | 73 | Login also modifies the |
55890414 | 74 | environment |
38259b3c | 75 | .IR environ (7) |
55890414 KM |
76 | with information specifying home directory, command interpreter, terminal |
77 | type (if available) and user name. | |
678ce1ab MK |
78 | The `\-p' argument causes the remainder of the environment to be preserved, |
79 | otherwise any previous environment is discarded. | |
55890414 | 80 | .PP |
678ce1ab | 81 | If the file /etc/nologin exists, |
55890414 KM |
82 | .I login |
83 | prints its contents on the user's terminal and exits. This is | |
84 | used by | |
85 | .IR shutdown (8) | |
86 | to stop users logging in when the system is about to go down. | |
87 | .PP | |
88 | Login is recognized by | |
89 | .IR sh (1) | |
90 | and | |
91 | .IR csh (1) | |
92 | and executed directly (without forking). | |
7ed14798 MK |
93 | .PP |
94 | There are several additional options to | |
95 | .I login | |
96 | for use at initial login. | |
97 | With one exception, these options are available only to the superuser. | |
98 | The | |
99 | .B \-h | |
100 | option is used by | |
e2be9dca | 101 | .IR telnetd (8) |
7ed14798 MK |
102 | and other servers to list the host from which |
103 | the connection was received. | |
104 | The | |
105 | .B \-f | |
106 | option is used with a username on the command line | |
107 | to indicate that proper authentication has already been done | |
108 | and that no password need be requested. | |
109 | This option may be used by the superuser | |
110 | or by the user specified on the command line. | |
55890414 KM |
111 | .SH FILES |
112 | .ta \w'/usr/spool/mail/*\ \ 'u | |
113 | /etc/utmp accounting | |
114 | .br | |
115 | /usr/adm/wtmp accounting | |
116 | .br | |
117 | /usr/spool/mail/* mail | |
118 | .br | |
119 | /etc/motd message-of-the-day | |
120 | .br | |
121 | /etc/passwd password file | |
122 | .br | |
123 | /etc/nologin stops logins | |
124 | .br | |
125 | \&.hushlogin makes login quieter | |
55890414 | 126 | .SH "SEE ALSO" |
e7f3a960 KB |
127 | mail(1), passwd(1), rlogin(1), getpass(3), passwd(5), utmp(5), environ(7), |
128 | init(8), getty(8), shutdown(8), | |
55890414 KM |
129 | .SH DIAGNOSTICS |
130 | \*(lqLogin incorrect,\*(rq | |
131 | if the name or the password is bad. | |
132 | .br | |
133 | \*(lqNo Shell\*(rq, \*(lqcannot open password file\*(rq, | |
134 | \*(lqno directory\*(rq: | |
135 | consult a programming counselor. |