Annotation of src/usr.bin/login/login.1, Revision 1.12
1.12 ! aaron 1: .\" $OpenBSD: login.1,v 1.11 1999/07/21 01:25:46 deraadt Exp $
1.1 deraadt 2: .\" $NetBSD: login.1,v 1.7 1995/08/31 22:52:33 jtc Exp $
3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)login.1 8.2 (Berkeley) 5/5/94
36: .\"
37: .Dd May 5, 1994
38: .Dt LOGIN 1
1.9 aaron 39: .Os
1.1 deraadt 40: .Sh NAME
41: .Nm login
42: .Nd log into the computer
43: .Sh SYNOPSIS
44: .Nm login
45: .Op Fl fp
46: .Op Fl h Ar hostname
47: .Op Ar user
48: .Sh DESCRIPTION
49: The
1.9 aaron 50: .Nm
1.1 deraadt 51: utility logs users (and pseudo-users) into the computer system.
52: .Pp
53: If no user is specified, or if a user is specified and authentication
54: of the user fails,
1.9 aaron 55: .Nm
1.1 deraadt 56: prompts for a user name.
57: Authentication of users is done via passwords.
1.12 ! aaron 58: Alternately, the user can enter the password
! 59: .Qq s/key ,
! 60: in which case
1.1 deraadt 61: S/Key authentication of users is performed, as descibed in
62: .Xr skey 1 .
63: S/Key is a Trademark of Bellcore.
64: .Pp
65: The options are as follows:
66: .Bl -tag -width Ds
67: .It Fl f
68: The
69: .Fl f
70: option is used when a user name is specified to indicate that proper
71: authentication has already been done and that no password need be
72: requested.
1.12 ! aaron 73: This option may only be used by the superuser or when an already
1.1 deraadt 74: logged in user is logging in as themselves.
1.11 deraadt 75: .It Fl h Ar hostname
1.1 deraadt 76: The
77: .Fl h
78: option specifies the host from which the connection was received.
79: It is used by various daemons such as
1.12 ! aaron 80: .Xr telnetd 8 .
! 81: This option may only be used by the superuser.
1.1 deraadt 82: .It Fl p
83: By default,
1.9 aaron 84: .Nm
1.1 deraadt 85: discards any previous environment.
86: The
87: .Fl p
88: option disables this behavior.
89: .El
90: .Pp
91: If the file
92: .Pa /etc/nologin
93: exists,
1.9 aaron 94: .Nm
1.1 deraadt 95: displays its contents to the user and exits.
96: This is used by
1.12 ! aaron 97: .Xr shutdown 8
1.1 deraadt 98: to prevent users from logging in when the system is about to go down.
99: .Pp
1.3 deraadt 100: If the file
101: .Pa /etc/fbtab
102: exists,
1.9 aaron 103: .Nm
1.3 deraadt 104: changes the protection and ownership of certain devices specified in this
105: file.
106: .Pp
1.10 aaron 107: If the file
1.5 millert 108: .Pa /var/log/failedlogin
1.10 aaron 109: exists,
1.9 aaron 110: .Nm
1.5 millert 111: will record failed login attempts in this file.
112: .Pp
1.1 deraadt 113: Immediately after logging a user in,
1.9 aaron 114: .Nm
1.1 deraadt 115: displays the system copyright notice, the date and time the user last
1.8 pjanzen 116: logged in, the date and time of the last unsuccessful login (if the file
1.5 millert 117: .Pa /var/log/failedlogin
118: exists), the message of the day as well as other information.
1.1 deraadt 119: If the file
120: .Dq Pa .hushlogin
121: exists in the user's home directory, all of these messages are suppressed.
122: This is to simplify logins for non-human users, such as
123: .Xr uucp 1 .
1.9 aaron 124: .Nm
1.1 deraadt 125: then records an entry in the
126: .Xr wtmp 5
127: and
128: .Xr utmp 5
129: files and executes the user's command interpreter.
130: .Pp
1.9 aaron 131: .Nm
1.7 aaron 132: enters information into the environment (see
1.1 deraadt 133: .Xr environ 7 )
1.7 aaron 134: specifying the user's home directory
135: .Pq Ev HOME ,
136: command interpreter
137: .Pq Ev SHELL ,
138: search path
139: .Pq Ev PATH ,
140: terminal type
141: .Pq Ev TERM ,
142: and user name
143: .Po both Ev LOGNAME and Ev USER
144: .Pc .
1.1 deraadt 145: .Pp
146: The standard shells,
147: .Xr csh 1
148: and
149: .Xr sh 1 ,
150: do not fork before executing the
1.9 aaron 151: .Nm
1.1 deraadt 152: utility.
153: .Sh FILES
1.7 aaron 154: .Bl -tag -width /var/log/failedlogin -compact
1.3 deraadt 155: .It Pa /etc/fbtab
156: changes device protections
1.1 deraadt 157: .It Pa /etc/motd
158: message-of-the-day
159: .It Pa /etc/nologin
160: disallows logins
161: .It Pa /var/run/utmp
162: current logins
163: .It Pa /var/log/lastlog
164: last login account records
165: .It Pa /var/log/wtmp
166: login account records
1.5 millert 167: .It Pa /var/log/failedlogin
168: failed login account records
1.1 deraadt 169: .It Pa /var/mail/user
170: system mailboxes
171: .It Pa \&.hushlogin
172: makes login quieter
173: .El
174: .Sh SEE ALSO
175: .Xr chpass 1 ,
176: .Xr passwd 1 ,
177: .Xr rlogin 1 ,
178: .Xr skey 1 ,
179: .Xr getpass 3 ,
1.7 aaron 180: .Xr fbtab 5 ,
1.1 deraadt 181: .Xr utmp 5 ,
1.7 aaron 182: .Xr environ 7
1.1 deraadt 183: .Sh HISTORY
184: A
1.9 aaron 185: .Nm
1.7 aaron 186: utility appeared in
1.1 deraadt 187: .At v6 .