xref: /dragonfly/usr.bin/login/login.1 (revision 1de703da)
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.2 (Berkeley) 5/5/94
33.\" $FreeBSD: src/usr.bin/login/login.1,v 1.17.2.2 2002/06/21 15:27:56 charnier Exp $
34.\" $DragonFly: src/usr.bin/login/login.1,v 1.2 2003/06/17 04:29:28 dillon Exp $
35.\"
36.Dd May 5, 1994
37.Dt LOGIN 1
38.Os
39.Sh NAME
40.Nm login
41.Nd log into the computer
42.Sh SYNOPSIS
43.Nm
44.Op Fl fp
45.Op Fl h Ar hostname
46.Op Ar user
47.Sh DESCRIPTION
48The
49.Nm
50utility logs users (and pseudo-users) into the computer system.
51.Pp
52If no user is specified, or if a user is specified and authentication
53of the user fails,
54.Nm
55prompts for a user name.
56Authentication of users is done via passwords.
57.Pp
58The options are as follows:
59.Bl -tag -width Ds
60.It Fl f
61The
62.Fl f
63option is used when a user name is specified to indicate that proper
64authentication has already been done and that no password need be
65requested.
66This option may only be used by the super-user or when an already
67logged in user is logging in as themselves.
68.It Fl h
69The
70.Fl h
71option specifies the host from which the connection was received.
72It is used by various daemons such as
73.Xr telnetd  8 .
74This option may only be used by the super-user.
75.It Fl p
76By default,
77.Nm
78discards any previous environment.
79The
80.Fl p
81option disables this behavior.
82.El
83.Pp
84If the file
85.Pa /var/run/nologin
86exists,
87.Nm
88displays its contents to the user and exits.
89This is used by
90.Xr shutdown  8
91to prevent users from logging in when the system is about to go down.
92.Pp
93If the file
94.Pa /etc/login.access
95exists,
96.Nm
97checks to see if the user and host pair are specifically allowed or denied
98access.
99Login access may also be controlled via the login class, which provides
100allow and deny records based on time, tty and remote host name.
101.Pp
102If the file
103.Pa /etc/fbtab
104exists,
105.Nm
106changes the protection and ownership of certain devices specified in this
107file.
108.Pp
109If the file
110.Pa /etc/skeykeys
111exists,
112.Nm
113will offer S/key password validation if the user has an entry in the file.
114.Pa /etc/skey.access
115controls from which hosts and/or networks the use of S/key passwords are
116obligated.
117.Pp
118Immediately after logging a user in,
119.Nm
120displays the system copyright notice, the date and time the user last
121logged in, the message of the day as well as other information.
122If the file
123.Dq Pa .hushlogin
124exists in the user's home directory, all of these messages are suppressed.
125This is to simplify logins for non-human users, such as
126.Xr uucp 1 .
127The
128.Nm
129utility then records an entry in the
130.Xr wtmp 5
131and
132.Xr utmp 5
133files and executes the user's command interpreter.
134.Pp
135The
136.Nm
137utility enters information into the environment (see
138.Xr environ 7 )
139specifying the user's home directory (HOME), command interpreter (SHELL),
140search path (PATH), terminal type (TERM) and user name (both LOGNAME and
141USER).
142Other environment variables may be set due to entries in the login
143class capabilities database, for the login class assigned in the
144user's system passwd record.
145The login class also controls the maximum and current process resource
146limits granted to a login, process priorities and many other aspects of
147a user's login environment.
148.Pp
149Some shells may provide a builtin
150.Nm
151command which is similar or identical to this utility.
152Consult the
153.Xr builtin 1
154manual page.
155.Sh FILES
156.Bl -tag -width /var/mail/userXXX -compact
157.It Pa /etc/fbtab
158changes device protections
159.It Pa /etc/login.access
160login access control table
161.It Pa /etc/login.conf
162login class capabilities database
163.It Pa /etc/motd
164message-of-the-day
165.It Pa /var/run/nologin
166disallows logins
167.It Pa /etc/skey.access
168skey password control table
169.It Pa /etc/skeykeys
170skey password database
171.It Pa /var/run/utmp
172current logins
173.It Pa /var/log/lastlog
174last login account records
175.It Pa /var/log/wtmp
176login account records
177.It Pa /var/mail/user
178system mailboxes
179.It Pa \&.hushlogin
180makes login quieter
181.It Pa /etc/auth.conf
182configure authentication services
183.It Pa /etc/pam.conf
184if
185.Nm
186is configured with PAM support, it uses
187.Pa /etc/pam.conf
188entries with service name
189.Dq login
190.El
191.Sh SEE ALSO
192.Xr builtin 1 ,
193.Xr chpass 1 ,
194.Xr csh 1 ,
195.Xr passwd 1 ,
196.Xr rlogin 1 ,
197.Xr skey 1 ,
198.Xr getpass 3 ,
199.Xr fbtab 5 ,
200.Xr login.access 5 ,
201.Xr login.conf 5 ,
202.Xr nologin 5 ,
203.Xr skey.access 5 ,
204.Xr utmp 5 ,
205.Xr environ 7 ,
206.Xr nologin 8 ,
207.Xr pam 8
208.Sh HISTORY
209A
210.Nm
211utility appeared in
212.At v6 .
213