]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/login/login.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / login / 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 .\" 4. 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$
30 .\"
31 .Dd September 13, 2006
32 .Dt LOGIN 1
33 .Os
34 .Sh NAME
35 .Nm login
36 .Nd log into the computer
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl fp
40 .Op Fl h Ar hostname
41 .Op Ar user
42 .Sh DESCRIPTION
43 The
44 .Nm
45 utility logs users (and pseudo-users) into the computer system.
46 .Pp
47 If no user is specified, or if a user is specified and authentication
48 of the user fails,
49 .Nm
50 prompts for a user name.
51 Authentication of users is configurable via
52 .Xr pam 8 .
53 Password authentication is the default.
54 .Pp
55 The following options are available:
56 .Bl -tag -width indent
57 .It Fl f
58 When a user name is specified, this option indicates that proper
59 authentication has already been done and that no password need be
60 requested.
61 This option may only be used by the super-user or when an already
62 logged in user is logging in as themselves.
63 .It Fl h
64 Specify the host from which the connection was received.
65 It is used by various daemons such as
66 .Xr telnetd 8 .
67 This option may only be used by the super-user.
68 .It Fl p
69 By default,
70 .Nm
71 discards any previous environment.
72 The
73 .Fl p
74 option disables this behavior.
75 .El
76 .Pp
77 Login access can be controlled via
78 .Xr login.access 5
79 or the login class in
80 .Xr login.conf 5 ,
81 which provides
82 allow and deny records based on time, tty and remote host name.
83 .Pp
84 If the file
85 .Pa /etc/fbtab
86 exists,
87 .Nm
88 changes the protection and ownership of certain devices specified in this
89 file.
90 .Pp
91 Immediately after logging a user in,
92 .Nm
93 displays the system copyright notice, the date and time the user last
94 logged in, the message of the day as well as other information.
95 If the file
96 .Pa .hushlogin
97 exists in the user's home directory, all of these messages are suppressed.
98 This is to simplify logins for non-human users, such as
99 .Xr uucp 1 .
100 .Pp
101 The
102 .Nm
103 utility enters information into the environment (see
104 .Xr environ 7 )
105 specifying the user's home directory (HOME), command interpreter (SHELL),
106 search path (PATH), terminal type (TERM) and user name (both LOGNAME and
107 USER).
108 Other environment variables may be set due to entries in the login
109 class capabilities database, for the login class assigned in the
110 user's system passwd record.
111 The login class also controls the maximum and current process resource
112 limits granted to a login, process priorities and many other aspects of
113 a user's login environment.
114 .Pp
115 Some shells may provide a builtin
116 .Nm
117 command which is similar or identical to this utility.
118 Consult the
119 .Xr builtin 1
120 manual page.
121 .Pp
122 The
123 .Nm
124 utility will submit an audit record when login succeeds or fails.
125 Failure to determine the current auditing state will
126 result in an error exit from
127 .Nm .
128 .Sh FILES
129 .Bl -tag -width ".Pa /etc/security/audit_control" -compact
130 .It Pa /etc/fbtab
131 changes device protections
132 .It Pa /etc/login.conf
133 login class capabilities database
134 .It Pa /etc/motd
135 message-of-the-day
136 .It Pa /var/mail/user
137 system mailboxes
138 .It Pa \&.hushlogin
139 makes login quieter
140 .It Pa /etc/pam.d/login
141 .Xr pam 8
142 configuration file
143 .It Pa /etc/security/audit_user
144 user flags for auditing
145 .It Pa /etc/security/audit_control
146 global flags for auditing
147 .El
148 .Sh SEE ALSO
149 .Xr builtin 1 ,
150 .Xr chpass 1 ,
151 .Xr csh 1 ,
152 .Xr newgrp 1 ,
153 .Xr passwd 1 ,
154 .Xr rlogin 1 ,
155 .Xr getpass 3 ,
156 .Xr fbtab 5 ,
157 .Xr login.access 5 ,
158 .Xr login.conf 5 ,
159 .Xr environ 7
160 .Sh HISTORY
161 A
162 .Nm
163 utility appeared in
164 .At v6 .