LOGIN(1) SysV LOGIN(1)
NAME
login - sign on
SYNOPSIS
login [ -p ] [ username ] [ env-var ... ]
DESCRIPTION
The login command signs a user onto the system, and can be subsequently
used to change from one user to another. The latter case is the one
described here. See Getting Started with Domain/OS for information on
initially logging in.
If login is invoked without an argument, it prompts for a username, and,
if appropriate, a password. Echoing is turned off (if possible) while
the user types the password, so it will not appear on the written record
of the session.
At some installations, you may be prompted for a second "dialup" password
by the prompt "dialup password:". Both passwords are required for a
successful login.
After a successful login, accounting files are updated and the operating
environment is set from the ~/.environ file if it exists, or from
/etc/environ if ~/.environ doesn't exist.
If your environment is BSD, you are informed of the existence of mail
(see mail(1)). For all environments, the message of the day (/etc/motd)
is printed. Both are suppressed if you have a .hushlogin file in your
home directory; this is mostly used to make life easier for non-human
users, such as uucp(1C).
After setting up the environment, login executes a command interpreter
(for example, a shell) as specified in the last field of your /etc/passwd
file entry. If this field in /etc/passwd is empty, the default command
interpreter is /bin/sh for the BSD and SysV environments, and /com/sh for
the Aegis environment. See csh(1), ksh(1), and sh(1) for a description
of the shell's startup behavior. Argument 0 of the command interpreter is
the name of the command interpreter with a leading dash ("-").
ENVIRONMENT INITIALIZATION
The login command initializes the user and group IDs and the working
directory, and modifies the environment as appropriate (see environ(7)).
The basic SysV environment is initialized to:
HOME=your-log-in-directory
LOGNAME=your-log-in-name
MAIL=/usr/mail/your-log-in-name
NODEID=your-node's-hexadecimal-id
NODETYPE=your-node's-model-number
ORGANIZATION=your-organization-name
PATH=/bin:/usr/bin:/usr/apollo/bin:
PROJECT=your-project-name
SHELL=last-field-of-passwd-entry
SYSTYPE=sys5.3
TERM=your-terminal-type
TZ=timezone-specification
USER=your-log-in-name
The basic BSD environment is initialized to:
HOME=your-log-in-directory
LOGNAME=your-log-in-name
MAIL=/usr/spool/mail/your-log-in-name
NODEID=your-node's-hexadecimal-id
NODETYPE=your-node's-model-number
ORGANIZATION=your-organization-name
PATH=/bin:/usr/bin:/usr/ucb:/usr/apollo/bin:
PROJECT=your-project-name
SHELL=last-field-of-passwd-entry
SYSTYPE=bsd4.3
TERM=your-terminal-type
TZ=timezone-specification
USER=your-log-in-name
The -p argument causes the remainder of the environment to be preserved,
otherwise any previous environment is discarded.
Modifying the Environment
The environment can be expanded or modified by supplying additional
arguments to login, either at execution time or when login requests your
log-in name. Arguments can take either the form xxx or xxx=yyy. Arguments
without an equal sign are placed in the environment as
Ln=xxx
where n is a number starting at 0 and is incremented each time a new
variable name is required. Variables containing = are placed in the
environment without modification. If they already appear in the
environment, then they replace the older value, with two exceptions. The
variables PATH and SHELL cannot be changed. Both login and getty
understand simple single-character quoting conventions. Typing a
backslash in front of a character quotes it and allows the inclusion of
such things as spaces and tabs.
DIAL-UP SECURITY
Sites wishing additional security protection on dial-up lines may want to
use these security features, /etc/d_users and /etc/d_passwd.
/etc/d_users is simply a file containing a list of users authorized to
log in on this node.
/etc/d_passwd is a file containing lines of the following format:
/bin/sh:encrypted-password:
where encrypted-password is the dial-in password for the specified shell
as returned by crypt(3). If an entry for the user's log-in shell is not
found in this file, the password for /bin/sh is used. ttys(5) manual
page.
NOTES
If the file /etc/nologin exists, login prints the contents of this file
on your terminal and exits. This is used by shutdown(8) to stop you from
logging in when the system is about to go down.
login is recognized by sh(1) and csh(1) and executed directly (without
forking).
An undocumented option, -r is used by the remote login server,
rlogind(1M) to force login to enter into an initial connection protocol.
-h is used by telnetd(1M) and other servers to list the host from which
the connection was received.
FILES
/etc/utmp accounting
/etc/wtmp accounting
/usr/mail/your-name mailbox for user your-name
/etc/motd message of the day
/etc/passwd password file
.hushlogin makes login quieter
DIAGNOSTICS
"Login incorrect," Username or password cannot be matched.
"no directory," Either the directory is invalid or the machine where the
directory exists can noit be reached.
"No shell", "cannot open password file", Consult a UNIX system
programmer.
BUGS
login(1) is not currently used for logging into the Display Manager or
the Server Process Manager, although the procedure used by those programs
is similar.
The System V Release 3 facility for using a "*" in the shell field of the
/etc/passwd file is not supported by Domain/OS.
SEE ALSO
mail(1), newgrp(1), sh(1), su(1M), passwd_override(4).
passwd(4), profile(4), environ(5) in the SysV Programmer's Reference.