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 | .\" | |
678ce1ab | 5 | .\" @(#)login.1 6.2 (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 | |
06ae098a | 13 | [ \-p ] [ username ] |
55890414 KM |
14 | .SH DESCRIPTION |
15 | The | |
16 | .I login | |
17 | command | |
18 | is used when a user initially | |
19 | signs on, or it may be used at any time to change | |
20 | from one user to another. | |
21 | The latter case is the one summarized above and | |
22 | described here. | |
23 | See \*(lqHow to Get Started\*(rq for how to dial up initially. | |
24 | .PP | |
25 | If | |
26 | .I login | |
27 | is invoked without an argument, | |
28 | it asks for a user name, and, if | |
29 | appropriate, a password. | |
30 | Echoing is turned off (if possible) during the typing of the password, | |
31 | so it will not appear on the written record of the | |
32 | session. | |
33 | .PP | |
34 | After a successful login, | |
35 | accounting files are updated and | |
36 | the user is informed of the | |
678ce1ab MK |
37 | existence of mail. |
38 | The message of the day is printed, | |
39 | as is the time of his last login. | |
40 | Both are suppressed if he has a \*(lq.hushlogin\*(rq | |
41 | file in his home directory; this | |
55890414 | 42 | is mostly used to make life easier for non-human users, such as |
678ce1ab | 43 | .IR uucp . |
55890414 KM |
44 | .PP |
45 | .I Login | |
46 | initializes the user and group IDs and the working directory, | |
47 | then executes a command interpreter (usually | |
678ce1ab | 48 | .IR csh (1)) |
55890414 | 49 | according to specifications found in a password file. |
678ce1ab MK |
50 | Argument 0 of the command interpreter is |
51 | the name of the command interpreter with | |
52 | a leading dash (\*(lq\-\*(rq). | |
55890414 | 53 | .PP |
06ae098a | 54 | Login also modifies the |
55890414 | 55 | environment |
38259b3c | 56 | .IR environ (7) |
55890414 KM |
57 | with information specifying home directory, command interpreter, terminal |
58 | type (if available) and user name. | |
678ce1ab MK |
59 | The `\-p' argument causes the remainder of the environment to be preserved, |
60 | otherwise any previous environment is discarded. | |
55890414 | 61 | .PP |
678ce1ab | 62 | If the file /etc/nologin exists, |
55890414 KM |
63 | .I login |
64 | prints its contents on the user's terminal and exits. This is | |
65 | used by | |
66 | .IR shutdown (8) | |
67 | to stop users logging in when the system is about to go down. | |
68 | .PP | |
69 | Login is recognized by | |
70 | .IR sh (1) | |
71 | and | |
72 | .IR csh (1) | |
73 | and executed directly (without forking). | |
74 | .SH FILES | |
75 | .ta \w'/usr/spool/mail/*\ \ 'u | |
76 | /etc/utmp accounting | |
77 | .br | |
78 | /usr/adm/wtmp accounting | |
79 | .br | |
80 | /usr/spool/mail/* mail | |
81 | .br | |
82 | /etc/motd message-of-the-day | |
83 | .br | |
84 | /etc/passwd password file | |
85 | .br | |
86 | /etc/nologin stops logins | |
87 | .br | |
88 | \&.hushlogin makes login quieter | |
55890414 | 89 | .SH "SEE ALSO" |
38259b3c | 90 | init(8), getty(8), mail(1), passwd(1), passwd(5), environ(7), |
678ce1ab | 91 | shutdown(8), rlogin(1c) |
55890414 KM |
92 | .SH DIAGNOSTICS |
93 | \*(lqLogin incorrect,\*(rq | |
94 | if the name or the password is bad. | |
95 | .br | |
96 | \*(lqNo Shell\*(rq, \*(lqcannot open password file\*(rq, | |
97 | \*(lqno directory\*(rq: | |
98 | consult a programming counselor. | |
38259b3c KM |
99 | .SH BUGS |
100 | An undocumented option, | |
101 | .B \-r | |
102 | is used by the remote login server, | |
103 | .IR rlogind (8C) | |
104 | to force | |
105 | .I login | |
106 | to enter into an initial connection protocol. | |
678ce1ab MK |
107 | .B \-h is used by |
108 | .IR telnetd (8C) | |
109 | and other servers to list the host from which | |
110 | the connection was received. |