Annotation of src/usr.bin/login/login.1, Revision 1.3
1.3 ! deraadt 1: .\" $OpenBSD: login.1,v 1.2 1996/06/26 05:36:01 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
39: .Os BSD 4
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
50: .Nm login
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,
55: .Nm login
56: prompts for a user name.
57: Authentication of users is done via passwords.
58: Alternately, the user can enter the password "s/key", in which case
59: S/Key authentication of users is performed, as descibed in
60: .Xr skey 1 .
61: S/Key is a Trademark of Bellcore.
62: .Pp
63: The options are as follows:
64: .Bl -tag -width Ds
65: .It Fl f
66: The
67: .Fl f
68: option is used when a user name is specified to indicate that proper
69: authentication has already been done and that no password need be
70: requested.
71: This option may only be used by the super-user or when an already
72: logged in user is logging in as themselves.
73: .It Fl h
74: The
75: .Fl h
76: option specifies the host from which the connection was received.
77: It is used by various daemons such as
78: .Xr telnetd 8 .
79: This option may only be used by the super-user.
80: .It Fl p
81: By default,
82: .Nm login
83: discards any previous environment.
84: The
85: .Fl p
86: option disables this behavior.
87: .El
88: .Pp
89: If the file
90: .Pa /etc/nologin
91: exists,
92: .Nm login
93: displays its contents to the user and exits.
94: This is used by
95: .Xr shutdown 8
96: to prevent users from logging in when the system is about to go down.
97: .Pp
1.3 ! deraadt 98: If the file
! 99: .Pa /etc/fbtab
! 100: exists,
! 101: .Nm login
! 102: changes the protection and ownership of certain devices specified in this
! 103: file.
! 104: .Pp
1.1 deraadt 105: Immediately after logging a user in,
106: .Nm login
107: displays the system copyright notice, the date and time the user last
108: logged in, the message of the day as well as other information.
109: If the file
110: .Dq Pa .hushlogin
111: exists in the user's home directory, all of these messages are suppressed.
112: This is to simplify logins for non-human users, such as
113: .Xr uucp 1 .
114: .Nm Login
115: then records an entry in the
116: .Xr wtmp 5
117: and
118: .Xr utmp 5
119: files and executes the user's command interpreter.
120: .Pp
121: Login enters information into the environment (see
122: .Xr environ 7 )
123: specifying the user's home directory (HOME), command interpreter (SHELL),
124: search path (PATH), terminal type (TERM) and user name (both LOGNAME and
125: USER).
126: .Pp
127: The standard shells,
128: .Xr csh 1
129: and
130: .Xr sh 1 ,
131: do not fork before executing the
132: .Nm login
133: utility.
134: .Sh FILES
135: .Bl -tag -width /var/mail/userXXX -compact
1.3 ! deraadt 136: .It Pa /etc/fbtab
! 137: changes device protections
1.1 deraadt 138: .It Pa /etc/motd
139: message-of-the-day
140: .It Pa /etc/nologin
141: disallows logins
142: .It Pa /var/run/utmp
143: current logins
144: .It Pa /var/log/lastlog
145: last login account records
146: .It Pa /var/log/wtmp
147: login account records
148: .It Pa /var/mail/user
149: system mailboxes
150: .It Pa \&.hushlogin
151: makes login quieter
152: .El
153: .Sh SEE ALSO
154: .Xr chpass 1 ,
155: .Xr passwd 1 ,
156: .Xr rlogin 1 ,
157: .Xr skey 1 ,
158: .Xr getpass 3 ,
159: .Xr utmp 5 ,
160: .Xr environ 7
161: .Sh HISTORY
162: A
163: .Nm login
164: appeared in
165: .At v6 .