xref: /freebsd/usr.bin/login/login.1 (revision ebf3356a26e53410d09fd37c7ca516a1a8ab5dce)
19b50d902SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
129b50d902SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
139b50d902SRodney W. Grimes.\"    must display the following acknowledgement:
149b50d902SRodney W. Grimes.\"	This product includes software developed by the University of
159b50d902SRodney W. Grimes.\"	California, Berkeley and its contributors.
169b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
179b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
189b50d902SRodney W. Grimes.\"    without specific prior written permission.
199b50d902SRodney W. Grimes.\"
209b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
219b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
229b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
239b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
249b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
259b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
269b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
279b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
289b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
299b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
309b50d902SRodney W. Grimes.\" SUCH DAMAGE.
319b50d902SRodney W. Grimes.\"
329c9cb2bfSPhilippe Charnier.\"	@(#)login.1	8.2 (Berkeley) 5/5/94
33c3aac50fSPeter Wemm.\" $FreeBSD$
349b50d902SRodney W. Grimes.\"
35b4ccfe1aSChristian Brueffer.Dd October 16, 2004
369b50d902SRodney W. Grimes.Dt LOGIN 1
3762500372SRuslan Ermilov.Os
389b50d902SRodney W. Grimes.Sh NAME
399b50d902SRodney W. Grimes.Nm login
409b50d902SRodney W. Grimes.Nd log into the computer
419b50d902SRodney W. Grimes.Sh SYNOPSIS
429c9cb2bfSPhilippe Charnier.Nm
439b50d902SRodney W. Grimes.Op Fl fp
449b50d902SRodney W. Grimes.Op Fl h Ar hostname
459b50d902SRodney W. Grimes.Op Ar user
469b50d902SRodney W. Grimes.Sh DESCRIPTION
479b50d902SRodney W. GrimesThe
489c9cb2bfSPhilippe Charnier.Nm
499b50d902SRodney W. Grimesutility logs users (and pseudo-users) into the computer system.
509b50d902SRodney W. Grimes.Pp
519b50d902SRodney W. GrimesIf no user is specified, or if a user is specified and authentication
529b50d902SRodney W. Grimesof the user fails,
539c9cb2bfSPhilippe Charnier.Nm
549b50d902SRodney W. Grimesprompts for a user name.
55d47b06fcSDaniel HarrisAuthentication of users is configurable via
56d47b06fcSDaniel Harris.Xr pam 8 .
57d47b06fcSDaniel HarrisPassword authentication is the default.
589b50d902SRodney W. Grimes.Pp
59e72bbdf4SPhilippe CharnierThe following options are available:
60e72bbdf4SPhilippe Charnier.Bl -tag -width indent
619b50d902SRodney W. Grimes.It Fl f
62e72bbdf4SPhilippe CharnierWhen a user name is specified, this option indicates that proper
639b50d902SRodney W. Grimesauthentication has already been done and that no password need be
649b50d902SRodney W. Grimesrequested.
659b50d902SRodney W. GrimesThis option may only be used by the super-user or when an already
669b50d902SRodney W. Grimeslogged in user is logging in as themselves.
679b50d902SRodney W. Grimes.It Fl h
68e72bbdf4SPhilippe CharnierSpecify the host from which the connection was received.
699b50d902SRodney W. GrimesIt is used by various daemons such as
709b50d902SRodney W. Grimes.Xr telnetd 8 .
719b50d902SRodney W. GrimesThis option may only be used by the super-user.
729b50d902SRodney W. Grimes.It Fl p
739b50d902SRodney W. GrimesBy default,
749c9cb2bfSPhilippe Charnier.Nm
759b50d902SRodney W. Grimesdiscards any previous environment.
769b50d902SRodney W. GrimesThe
779b50d902SRodney W. Grimes.Fl p
789b50d902SRodney W. Grimesoption disables this behavior.
799b50d902SRodney W. Grimes.El
809b50d902SRodney W. Grimes.Pp
81ebf3356aSYaroslav TykhiyLogin access can be controlled via
82ebf3356aSYaroslav Tykhiy.Xr login.access 5
83ebf3356aSYaroslav Tykhiyor the login class in
84ebf3356aSYaroslav Tykhiy.Xr login.conf 5 ,
85ebf3356aSYaroslav Tykhiywhich provides
865217f56eSDavid Nugentallow and deny records based on time, tty and remote host name.
87e830e7f5SMike Pritchard.Pp
88e830e7f5SMike PritchardIf the file
89f88fe867SGuido van Rooij.Pa /etc/fbtab
90f88fe867SGuido van Rooijexists,
919c9cb2bfSPhilippe Charnier.Nm
92f88fe867SGuido van Rooijchanges the protection and ownership of certain devices specified in this
93f88fe867SGuido van Rooijfile.
94f88fe867SGuido van Rooij.Pp
959b50d902SRodney W. GrimesImmediately after logging a user in,
969c9cb2bfSPhilippe Charnier.Nm
979b50d902SRodney W. Grimesdisplays the system copyright notice, the date and time the user last
989b50d902SRodney W. Grimeslogged in, the message of the day as well as other information.
999b50d902SRodney W. GrimesIf the file
100e72bbdf4SPhilippe Charnier.Pa .hushlogin
1019b50d902SRodney W. Grimesexists in the user's home directory, all of these messages are suppressed.
1029b50d902SRodney W. GrimesThis is to simplify logins for non-human users, such as
1039b50d902SRodney W. Grimes.Xr uucp 1 .
1049b50d902SRodney W. Grimes.Pp
105e8937ba0SPhilippe CharnierThe
106e8937ba0SPhilippe Charnier.Nm
107e8937ba0SPhilippe Charnierutility enters information into the environment (see
1089b50d902SRodney W. Grimes.Xr environ 7 )
1099b50d902SRodney W. Grimesspecifying the user's home directory (HOME), command interpreter (SHELL),
1109b50d902SRodney W. Grimessearch path (PATH), terminal type (TERM) and user name (both LOGNAME and
1119b50d902SRodney W. GrimesUSER).
1125217f56eSDavid NugentOther environment variables may be set due to entries in the login
1135217f56eSDavid Nugentclass capabilities database, for the login class assigned in the
1145217f56eSDavid Nugentuser's system passwd record.
1155217f56eSDavid NugentThe login class also controls the maximum and current process resource
1165217f56eSDavid Nugentlimits granted to a login, process priorities and many other aspects of
1175217f56eSDavid Nugenta user's login environment.
1189b50d902SRodney W. Grimes.Pp
119c644db6aSSheldon HearnSome shells may provide a builtin
1209c9cb2bfSPhilippe Charnier.Nm
121e6d3cf26SSheldon Hearncommand which is similar or identical to this utility.
122e6d3cf26SSheldon HearnConsult the
123c644db6aSSheldon Hearn.Xr builtin 1
124c644db6aSSheldon Hearnmanual page.
125a1c73d21SWayne Salamon.Pp
126a1c73d21SWayne SalamonThe
127a1c73d21SWayne Salamon.Nm
128a1c73d21SWayne Salamonutility will submit an audit record when login succeeds or fails.
129a1c73d21SWayne SalamonFailure to determine the current auditing state will
130a1c73d21SWayne Salamonresult in an error exit from
131a1c73d21SWayne Salamon.Nm .
1329b50d902SRodney W. Grimes.Sh FILES
133ebf3356aSYaroslav Tykhiy.Bl -tag -width ".Pa /etc/login.conf" -compact
134f88fe867SGuido van Rooij.It Pa /etc/fbtab
135f88fe867SGuido van Rooijchanges device protections
1365217f56eSDavid Nugent.It Pa /etc/login.conf
1375217f56eSDavid Nugentlogin class capabilities database
1389b50d902SRodney W. Grimes.It Pa /etc/motd
1399b50d902SRodney W. Grimesmessage-of-the-day
1409b50d902SRodney W. Grimes.It Pa /var/mail/user
1419b50d902SRodney W. Grimessystem mailboxes
1429b50d902SRodney W. Grimes.It Pa \&.hushlogin
1439b50d902SRodney W. Grimesmakes login quieter
1448f176b43SMark Murray.It Pa /etc/auth.conf
1458f176b43SMark Murrayconfigure authentication services
146a0d974b1SChristian Brueffer.It Pa /etc/pam.d/login
147a0d974b1SChristian Brueffer.Xr pam 8
148a0d974b1SChristian Bruefferconfiguration file
149a1c73d21SWayne Salamon.It Pa /etc/security/audit_user
150a1c73d21SWayne Salamonuser flags for auditing
151a1c73d21SWayne Salamon.It Pa /etc/security/audit_control
152a1c73d21SWayne Salamonglobal flags for auditing
1539b50d902SRodney W. Grimes.El
1549b50d902SRodney W. Grimes.Sh SEE ALSO
155c644db6aSSheldon Hearn.Xr builtin 1 ,
1569b50d902SRodney W. Grimes.Xr chpass 1 ,
157c644db6aSSheldon Hearn.Xr csh 1 ,
1589b50d902SRodney W. Grimes.Xr passwd 1 ,
1599b50d902SRodney W. Grimes.Xr rlogin 1 ,
1609b50d902SRodney W. Grimes.Xr getpass 3 ,
161f88fe867SGuido van Rooij.Xr fbtab 5 ,
162e830e7f5SMike Pritchard.Xr login.access 5 ,
1635217f56eSDavid Nugent.Xr login.conf 5 ,
16413608f66SWolfram Schneider.Xr environ 7 ,
1654bc34f94SMatthew Dillon.Xr pam 8
1669b50d902SRodney W. Grimes.Sh HISTORY
1679b50d902SRodney W. GrimesA
1689c9cb2bfSPhilippe Charnier.Nm
1699c9cb2bfSPhilippe Charnierutility appeared in
1709b50d902SRodney W. Grimes.At v6 .
171