[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.7

1.7     ! aaron       1: .\"    $OpenBSD: login.1,v 1.6 1997/09/14 01:02:21 deraadt 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
                     39: .Os BSD 4
                     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
                     47: .Op Ar user
                     48: .Sh DESCRIPTION
                     49: The
                     50: .Nm login
                     51: utility logs users (and pseudo-users) into the computer system.
                     52: .Pp
                     53: If no user is specified, or if a user is specified and authentication
                     54: of the user fails,
                     55: .Nm login
                     56: prompts for a user name.
                     57: Authentication of users is done via passwords.
                     58: Alternately, the user can enter the password "s/key", in which case
                     59: S/Key authentication of users is performed, as descibed in
                     60: .Xr skey 1 .
                     61: S/Key is a Trademark of Bellcore.
                     62: .Pp
                     63: The options are as follows:
                     64: .Bl -tag -width Ds
                     65: .It Fl f
                     66: The
                     67: .Fl f
                     68: option is used when a user name is specified to indicate that proper
                     69: authentication has already been done and that no password need be
                     70: requested.
                     71: This option may only be used by the super-user or when an already
                     72: logged in user is logging in as themselves.
                     73: .It Fl h
                     74: The
                     75: .Fl h
                     76: option specifies the host from which the connection was received.
                     77: It is used by various daemons such as
                     78: .Xr telnetd  8 .
                     79: This option may only be used by the super-user.
                     80: .It Fl p
                     81: By default,
                     82: .Nm login
                     83: discards any previous environment.
                     84: The
                     85: .Fl p
                     86: option disables this behavior.
                     87: .El
                     88: .Pp
                     89: If the file
                     90: .Pa /etc/nologin
                     91: exists,
                     92: .Nm login
                     93: displays its contents to the user and exits.
                     94: This is used by
                     95: .Xr shutdown  8
                     96: to prevent users from logging in when the system is about to go down.
                     97: .Pp
1.3       deraadt    98: If the file
                     99: .Pa /etc/fbtab
                    100: exists,
                    101: .Nm login
                    102: changes the protection and ownership of certain devices specified in this
                    103: file.
                    104: .Pp
1.5       millert   105: If the file
                    106: .Pa /var/log/failedlogin
                    107: exists,
                    108: .Nm login
                    109: will record failed login attempts in this file.
                    110: .Pp
1.1       deraadt   111: Immediately after logging a user in,
                    112: .Nm login
                    113: displays the system copyright notice, the date and time the user last
1.5       millert   114: logged in, the date and time of the last unsucessful login (if the file
                    115: .Pa /var/log/failedlogin
                    116: exists), the message of the day as well as other information.
1.1       deraadt   117: If the file
                    118: .Dq Pa .hushlogin
                    119: exists in the user's home directory, all of these messages are suppressed.
                    120: This is to simplify logins for non-human users, such as
                    121: .Xr uucp 1 .
1.7     ! aaron     122: .Nm login
1.1       deraadt   123: then records an entry in the
                    124: .Xr wtmp 5
                    125: and
                    126: .Xr utmp 5
                    127: files and executes the user's command interpreter.
                    128: .Pp
1.7     ! aaron     129: .Nm login
        !           130: enters information into the environment (see
1.1       deraadt   131: .Xr environ 7 )
1.7     ! aaron     132: specifying the user's home directory
        !           133: .Pq Ev HOME ,
        !           134: command interpreter
        !           135: .Pq Ev SHELL ,
        !           136: search path
        !           137: .Pq Ev PATH ,
        !           138: terminal type
        !           139: .Pq Ev TERM ,
        !           140: and user name
        !           141: .Po both Ev LOGNAME and Ev USER
        !           142: .Pc .
1.1       deraadt   143: .Pp
                    144: The standard shells,
                    145: .Xr csh 1
                    146: and
                    147: .Xr sh 1 ,
                    148: do not fork before executing the
                    149: .Nm login
                    150: utility.
                    151: .Sh FILES
1.7     ! aaron     152: .Bl -tag -width /var/log/failedlogin -compact
1.3       deraadt   153: .It Pa /etc/fbtab
                    154: changes device protections
1.1       deraadt   155: .It Pa /etc/motd
                    156: message-of-the-day
                    157: .It Pa /etc/nologin
                    158: disallows logins
                    159: .It Pa /var/run/utmp
                    160: current logins
                    161: .It Pa /var/log/lastlog
                    162: last login account records
                    163: .It Pa /var/log/wtmp
                    164: login account records
1.5       millert   165: .It Pa /var/log/failedlogin
                    166: failed login account records
1.1       deraadt   167: .It Pa /var/mail/user
                    168: system mailboxes
                    169: .It Pa \&.hushlogin
                    170: makes login quieter
                    171: .El
                    172: .Sh SEE ALSO
                    173: .Xr chpass 1 ,
                    174: .Xr passwd 1 ,
                    175: .Xr rlogin 1 ,
                    176: .Xr skey 1 ,
                    177: .Xr getpass 3 ,
1.7     ! aaron     178: .Xr fbtab 5 ,
1.1       deraadt   179: .Xr utmp 5 ,
1.7     ! aaron     180: .Xr environ 7
1.1       deraadt   181: .Sh HISTORY
                    182: A
                    183: .Nm login
1.7     ! aaron     184: utility appeared in
1.1       deraadt   185: .At v6 .