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