xref: /dragonfly/usr.bin/login/login.1 (revision c89a6c1b)
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.33 2007/11/30 11:02:36 philip Exp $
34.\" $DragonFly: src/usr.bin/login/login.1,v 1.2 2003/06/17 04:29:28 dillon Exp $
35.\"
36.Dd September 13, 2006
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 configurable via
57.Xr pam 8 .
58Password authentication is the default.
59.Pp
60The following options are available:
61.Bl -tag -width indent
62.It Fl f
63When a user name is specified, this option indicates 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
69Specify the host from which the connection was received.
70It is used by various daemons such as
71.Xr telnetd 8 .
72This option may only be used by the super-user.
73.It Fl p
74By default,
75.Nm
76discards any previous environment.
77The
78.Fl p
79option disables this behavior.
80.El
81.Pp
82Login access can be controlled via
83.Xr login.access 5
84or the login class in
85.Xr login.conf 5 ,
86which provides
87allow and deny records based on time, tty and remote host name.
88.Pp
89If the file
90.Pa /etc/fbtab
91exists,
92.Nm
93changes the protection and ownership of certain devices specified in this
94file.
95.Pp
96Immediately after logging a user in,
97.Nm
98displays the system copyright notice, the date and time the user last
99logged in, the message of the day as well as other information.
100If the file
101.Pa .hushlogin
102exists in the user's home directory, all of these messages are suppressed.
103This is to simplify logins for non-human users, such as
104.Xr uucp 1 .
105.Pp
106The
107.Nm
108utility enters information into the environment (see
109.Xr environ 7 )
110specifying the user's home directory (HOME), command interpreter (SHELL),
111search path (PATH), terminal type (TERM) and user name (both LOGNAME and
112USER).
113Other environment variables may be set due to entries in the login
114class capabilities database, for the login class assigned in the
115user's system passwd record.
116The login class also controls the maximum and current process resource
117limits granted to a login, process priorities and many other aspects of
118a user's login environment.
119.Pp
120Some shells may provide a builtin
121.Nm
122command which is similar or identical to this utility.
123Consult the
124.Xr builtin 1
125manual page.
126.Sh FILES
127.Bl -tag -width ".Pa /etc/pam.d/login" -compact
128.It Pa /etc/fbtab
129changes device protections
130.It Pa /etc/login.conf
131login class capabilities database
132.It Pa /etc/motd
133message-of-the-day
134.It Pa /var/mail/user
135system mailboxes
136.It Pa \&.hushlogin
137makes login quieter
138.It Pa /etc/auth.conf
139configure authentication services
140.It Pa /etc/pam.d/login
141.Xr pam 8
142configuration file
143.El
144.Sh SEE ALSO
145.Xr builtin 1 ,
146.Xr chpass 1 ,
147.Xr csh 1 ,
148.Xr newgrp 1 ,
149.Xr passwd 1 ,
150.Xr rlogin 1 ,
151.Xr getpass 3 ,
152.Xr fbtab 5 ,
153.Xr login.access 5 ,
154.Xr login.conf 5 ,
155.Xr environ 7
156.Sh HISTORY
157A
158.Nm
159utility appeared in
160.At v6 .
161