shadow/man/login.1

136 lines
5.5 KiB
Groff

.\"$Id: login.1,v 1.18 2004/12/11 20:05:01 kloczek Exp $
.\" Copyright 1989 - 1994, Julianne Frances Haugh
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.TH LOGIN 1
.SH NAME
login \- begin session on the system
.SH SYNOPSIS
\fBlogin\fR [\fB-p\fR] [\fIusername\fR] [\fIENV=VAR\fR ...]
.br
\fBlogin\fR [\fB-p\fR] [\fB-h \fIhost\fR] [\fB-f \fIusername\fR]
.br
\fBlogin\fR [\fB-p\fR] \fB-r \fIhost\fR
.SH DESCRIPTION
\fBlogin\fR is used to establish a new session with the system. It is
normally invoked automatically by responding to the \fIlogin:\fR prompt on
the user\'s terminal. fBlogin\fR may be special to the shell and may not be
invoked as a sub-process. Typically, \fBlogin\fR is treated by the shell as
\fBexec login\fR which causes the user to exit from the current shell.
Attempting to execute \fBlogin\fR from any shell but the login shell will
produce an error message.
.PP
When invoked from the \fIlogin:\fR prompt, the user may enter environmental
variables after the username. These variables are entered in the form
\fBNAME=VALUE\fR. Not all variables may be set in the fashion, notably
\fBPATH\fR, \fBHOME\fR and \fBSHELL\fR. Additionally, \fBIFS\fR may be
inhibited if the user\'s login shell is \fB/bin/sh\fR.
.PP
The user is then prompted for a password, where appropriate. Echoing is
disabled to prevent revealing the password. Only a small number of password
failures are permitted before \fBlogin\fR exits and the communications link
is severed.
.PP
If password aging has been enabled for your account, you may be prompted for
a new password before proceeding. You will be forced to provide your old
password and the new password before continuing. Please refer to
\fBpasswd\fR(1) for more information.
.PP
After a successful login, you will be informed of any system messages and
the presence of mail. You may turn off the printing of the system message
file, \fI/etc/motd\fR, by creating a zero-length file \fI.hushlogin\fR in
your login directory. The mail message will be one of "\fBYou have new
mail.\fR", "\fBYou have mail.\fR", or "\fBNo Mail.\fR" according to the
condition of your mailbox.
.PP
Your user and group ID will be set according to their values in
the \fI/etc/passwd\fR file.
The value for \fB$HOME\fR, \fB$SHELL\fR, \fB$PATH\fR, \fB$LOGNAME\fR,
and \fB$MAIL\fR are set according to the appropriate fields in the
password entry.
Ulimit, umask and nice values may also be set according to
entries in the GECOS field.
.PP
On some installations, the environmental variable \fB$TERM\fR will be
initialized to the terminal type on your tty line, as specified in
\fI/etc/ttytype\fR.
.PP
An initialization script for your command interpreter may also be
executed.
Please see the appropriate manual section for more information on
this function.
.PP
A subsystem login is indicated by the presence of a "*" as the first
character of the login shell. The given home directory will be used as
the root of a new file system which the user is actually logged into.
.SH OPTIONS
.IP "\fB-f\fR"
Do not perform authentication, user is preauthenticated.
.IP "\fB-h\fR"
Name of the remote host for this login.
.IP "\fB-p\fR"
Preserve environment.
.IP "\fB-r\fR"
Perform autologin protocol for rlogin.
.PP
The \fB-r\fP, \fB-h\fP and \fB-f\fP options are only used when \fBlogin\fP is
invoked by root.
.SH CAVEATS
This version of \fBlogin\fR has many compilation options, only some of which
may be in use at any particular site.
.PP
The location of files is subject to differences in system configuration.
.SH FILES
\fI/var/run/utmp\fR \- list of current login sessions
.br
\fI/var/log/wtmp\fR \- list of previous login sessions
.br
\fI/etc/passwd\fR \- user account information
.br
\fI/etc/shadow\fR \- encrypted passwords and age information
.br
\fI/etc/motd\fR \- system message file
.br
\fI/etc/nologin\fR \- prevent non-root users from logging in
.br
\fI/etc/ttytype\fR \- list of terminal types
.br
\fI$HOME/.hushlogin\fR \- suppress printing of system messages
.SH SEE ALSO
.BR mail (1),
.BR passwd (1),
.BR sh (1),
.BR su (1),
.BR login.defs (5),
.BR nologin (5),
.BR passwd (5),
.BR getty (8)
.SH AUTHOR
Julianne Frances Haugh <jockgrrl@ix.netcom.com>