[BACK]Return to login.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / login

Annotation of src/usr.bin/login/login.1, Revision 1.14

1.14    ! millert     1: .\"    $OpenBSD: login.1,v 1.13 2000/03/24 21:41:08 aaron Exp $
1.1       deraadt     2: .\"    $NetBSD: login.1,v 1.7 1995/08/31 22:52:33 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1980, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"    @(#)login.1     8.2 (Berkeley) 5/5/94
                     36: .\"
                     37: .Dd May 5, 1994
                     38: .Dt LOGIN 1
1.9       aaron      39: .Os
1.1       deraadt    40: .Sh NAME
                     41: .Nm login
                     42: .Nd log into the computer
                     43: .Sh SYNOPSIS
                     44: .Nm login
                     45: .Op Fl fp
                     46: .Op Fl h Ar hostname
1.14    ! millert    47: .Op Fl u Ar username
1.1       deraadt    48: .Op Ar user
                     49: .Sh DESCRIPTION
                     50: The
1.9       aaron      51: .Nm
1.1       deraadt    52: utility logs users (and pseudo-users) into the computer system.
                     53: .Pp
                     54: If no user is specified, or if a user is specified and authentication
                     55: of the user fails,
1.9       aaron      56: .Nm
1.1       deraadt    57: prompts for a user name.
                     58: Authentication of users is done via passwords.
1.12      aaron      59: Alternately, the user can enter the password
                     60: .Qq s/key ,
                     61: in which case
1.1       deraadt    62: S/Key authentication of users is performed, as descibed in
                     63: .Xr skey 1 .
                     64: S/Key is a Trademark of Bellcore.
                     65: .Pp
                     66: The options are as follows:
                     67: .Bl -tag -width Ds
                     68: .It Fl f
                     69: The
                     70: .Fl f
                     71: option is used when a user name is specified to indicate that proper
                     72: authentication has already been done and that no password need be
                     73: requested.
1.12      aaron      74: This option may only be used by the superuser or when an already
1.1       deraadt    75: logged in user is logging in as themselves.
1.11      deraadt    76: .It Fl h Ar hostname
1.14    ! millert    77: Specifies the host from which the connection was received.
        !            78: It is used by various daemons such as
        !            79: .Xr telnetd 8 .
        !            80: This option may only be used by the superuser.
        !            81: .It Fl u Ar username
        !            82: Specifies the remote user that initiated the connection.
1.1       deraadt    83: It is used by various daemons such as
1.12      aaron      84: .Xr telnetd 8 .
                     85: This option may only be used by the superuser.
1.1       deraadt    86: .It Fl p
                     87: By default,
1.9       aaron      88: .Nm
1.1       deraadt    89: discards any previous environment.
                     90: The
                     91: .Fl p
                     92: option disables this behavior.
                     93: .El
                     94: .Pp
                     95: If the file
                     96: .Pa /etc/nologin
                     97: exists,
1.9       aaron      98: .Nm
1.1       deraadt    99: displays its contents to the user and exits.
                    100: This is used by
1.12      aaron     101: .Xr shutdown 8
1.1       deraadt   102: to prevent users from logging in when the system is about to go down.
                    103: .Pp
1.3       deraadt   104: If the file
                    105: .Pa /etc/fbtab
                    106: exists,
1.9       aaron     107: .Nm
1.3       deraadt   108: changes the protection and ownership of certain devices specified in this
                    109: file.
                    110: .Pp
1.10      aaron     111: If the file
1.5       millert   112: .Pa /var/log/failedlogin
1.10      aaron     113: exists,
1.9       aaron     114: .Nm
1.5       millert   115: will record failed login attempts in this file.
                    116: .Pp
1.1       deraadt   117: Immediately after logging a user in,
1.9       aaron     118: .Nm
1.1       deraadt   119: displays the system copyright notice, the date and time the user last
1.8       pjanzen   120: logged in, the date and time of the last unsuccessful login (if the file
1.5       millert   121: .Pa /var/log/failedlogin
                    122: exists), the message of the day as well as other information.
1.1       deraadt   123: If the file
                    124: .Dq Pa .hushlogin
                    125: exists in the user's home directory, all of these messages are suppressed.
                    126: This is to simplify logins for non-human users, such as
                    127: .Xr uucp 1 .
1.9       aaron     128: .Nm
1.1       deraadt   129: then records an entry in the
                    130: .Xr wtmp 5
                    131: and
                    132: .Xr utmp 5
                    133: files and executes the user's command interpreter.
                    134: .Pp
1.9       aaron     135: .Nm
1.7       aaron     136: enters information into the environment (see
1.1       deraadt   137: .Xr environ 7 )
1.7       aaron     138: specifying the user's home directory
                    139: .Pq Ev HOME ,
                    140: command interpreter
                    141: .Pq Ev SHELL ,
                    142: search path
                    143: .Pq Ev PATH ,
                    144: terminal type
                    145: .Pq Ev TERM ,
                    146: and user name
                    147: .Po both Ev LOGNAME and Ev USER
                    148: .Pc .
1.1       deraadt   149: .Pp
                    150: The standard shells,
                    151: .Xr csh 1
                    152: and
                    153: .Xr sh 1 ,
                    154: do not fork before executing the
1.9       aaron     155: .Nm
1.1       deraadt   156: utility.
1.14    ! millert   157: .Sh ENVIRONMENT
        !           158: .Nm
        !           159: sets the following environment variables:
        !           160: .Bl -tag -width REMOTEHOST
        !           161: .It Ev HOME
        !           162: The user's home directory, as specified by the password database.
        !           163: .It Ev SHELL
        !           164: The user's shell, as specified by the password database.
        !           165: .It Ev TERM
        !           166: The user's terminal type, if it can be determined.
        !           167: .It Ev LOGNAME
        !           168: The user's login name.
        !           169: .It Ev USER
        !           170: Same as
        !           171: .Ev LOGNAME .
        !           172: .It Ev REMOTEHOST
        !           173: The name of the host from which the user logged in, if the
        !           174: .Fl h
        !           175: flag was specified.
        !           176: .It Ev REMOTEUSER
        !           177: The name of the remote user who initiated the connection, if the
        !           178: .Fl u
        !           179: flag was specified.
        !           180: .El
1.1       deraadt   181: .Sh FILES
1.7       aaron     182: .Bl -tag -width /var/log/failedlogin -compact
1.3       deraadt   183: .It Pa /etc/fbtab
                    184: changes device protections
1.1       deraadt   185: .It Pa /etc/motd
                    186: message-of-the-day
                    187: .It Pa /etc/nologin
                    188: disallows logins
                    189: .It Pa /var/run/utmp
                    190: current logins
                    191: .It Pa /var/log/lastlog
                    192: last login account records
                    193: .It Pa /var/log/wtmp
                    194: login account records
1.5       millert   195: .It Pa /var/log/failedlogin
                    196: failed login account records
1.1       deraadt   197: .It Pa /var/mail/user
                    198: system mailboxes
                    199: .It Pa \&.hushlogin
                    200: makes login quieter
                    201: .El
                    202: .Sh SEE ALSO
                    203: .Xr chpass 1 ,
                    204: .Xr passwd 1 ,
                    205: .Xr rlogin 1 ,
                    206: .Xr skey 1 ,
                    207: .Xr getpass 3 ,
1.7       aaron     208: .Xr fbtab 5 ,
1.1       deraadt   209: .Xr utmp 5 ,
1.7       aaron     210: .Xr environ 7
1.1       deraadt   211: .Sh HISTORY
                    212: A
1.9       aaron     213: .Nm
1.7       aaron     214: utility appeared in
1.13      aaron     215: .At v5 .