xref: /dragonfly/usr.bin/login/login.1 (revision cfd1aba3)
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. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"	@(#)login.1	8.2 (Berkeley) 5/5/94
29.\" $FreeBSD: src/usr.bin/login/login.1,v 1.33 2007/11/30 11:02:36 philip Exp $
30.\" $DragonFly: src/usr.bin/login/login.1,v 1.2 2003/06/17 04:29:28 dillon Exp $
31.\"
32.Dd September 13, 2006
33.Dt LOGIN 1
34.Os
35.Sh NAME
36.Nm login
37.Nd log into the computer
38.Sh SYNOPSIS
39.Nm
40.Op Fl fp
41.Op Fl h Ar hostname
42.Op Ar user
43.Sh DESCRIPTION
44The
45.Nm
46utility logs users (and pseudo-users) into the computer system.
47.Pp
48If no user is specified, or if a user is specified and authentication
49of the user fails,
50.Nm
51prompts for a user name.
52Authentication of users is configurable via
53.Xr pam 8 .
54Password authentication is the default.
55.Pp
56The following options are available:
57.Bl -tag -width indent
58.It Fl f
59When a user name is specified, this option indicates that proper
60authentication has already been done and that no password need be
61requested.
62This option may only be used by the super-user or when an already
63logged in user is logging in as themselves.
64.It Fl h
65Specify the host from which the connection was received.
66It is used by various daemons such as
67.Xr telnetd 8 .
68This option may only be used by the super-user.
69.It Fl p
70By default,
71.Nm
72discards any previous environment.
73The
74.Fl p
75option disables this behavior.
76.El
77.Pp
78Login access can be controlled via
79.Xr login.access 5
80or the login class in
81.Xr login.conf 5 ,
82which provides
83allow and deny records based on time, tty and remote host name.
84.Pp
85If the file
86.Pa /etc/fbtab
87exists,
88.Nm
89changes the protection and ownership of certain devices specified in this
90file.
91.Pp
92Immediately after logging a user in,
93.Nm
94displays the system copyright notice, the date and time the user last
95logged in, the message of the day as well as other information.
96If the file
97.Pa .hushlogin
98exists in the user's home directory, all of these messages are suppressed.
99This is to simplify logins for non-human users, such as
100.Xr uucp 1 .
101.Pp
102The
103.Nm
104utility enters information into the environment (see
105.Xr environ 7 )
106specifying the user's home directory (HOME), command interpreter (SHELL),
107search path (PATH), terminal type (TERM) and user name (both LOGNAME and
108USER).
109Other environment variables may be set due to entries in the login
110class capabilities database, for the login class assigned in the
111user's system passwd record.
112The login class also controls the maximum and current process resource
113limits granted to a login, process priorities and many other aspects of
114a user's login environment.
115.Pp
116Some shells may provide a builtin
117.Nm
118command which is similar or identical to this utility.
119Consult the
120.Xr builtin 1
121manual page.
122.Sh FILES
123.Bl -tag -width ".Pa /etc/pam.d/login" -compact
124.It Pa /etc/fbtab
125changes device protections
126.It Pa /etc/login.conf
127login class capabilities database
128.It Pa /etc/motd
129message-of-the-day
130.It Pa /var/mail/user
131system mailboxes
132.It Pa \&.hushlogin
133makes login quieter
134.It Pa /etc/auth.conf
135configure authentication services
136.It Pa /etc/pam.d/login
137.Xr pam 8
138configuration file
139.El
140.Sh SEE ALSO
141.Xr builtin 1 ,
142.Xr chpass 1 ,
143.Xr csh 1 ,
144.Xr newgrp 1 ,
145.Xr passwd 1 ,
146.Xr rlogin 1 ,
147.Xr getpass 3 ,
148.Xr fbtab 5 ,
149.Xr login.access 5 ,
150.Xr login.conf 5 ,
151.Xr environ 7
152.Sh HISTORY
153A
154.Nm
155utility appeared in
156.At v6 .
157