Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mail(1)

passwd(1)

rlogin(1c)

sh(1)

passwd(5)

environ(7)

init(8)

getty(8)

shutdown(8)

LOGIN(1)                             BSD                              LOGIN(1)



NAME
     login - sign on

SYNOPSIS
     login [ -p ] [ username ] [ env-var ... ]

DESCRIPTION
     The login command is used when a user initially signs on, or it may be
     used at any time to change from one user to another.  The latter case is
     the one summarized above and described here.  See Getting Started with
     Domain/OS for information on initially logging in.

     If login is invoked without an argument, it prompts you for a username,
     and, if appropriate, a password.  Echoing is turned off (if possible)
     while you type the password, so it will not appear on the written record
     of the session.

     At some installations, an option may be invoked that requires you to
     enter a second "dialup" password.  This only occurs for dial-up
     connections, and is prompted by the message "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).

     The login command initializes the user and group IDs and the working
     directory, and modifies the environment as follows (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=:/usr/ucb:/bin:/usr/bin:/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.

     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.

     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 ("-").

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(8C) to force login to enter into an initial connection protocol.
     -h is used by telnetd(8C) and other servers to list the host from which
     the connection was received.

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.

FILES
     /etc/utmp           accounting
     /usr/adm/wtmp       accounting
     /usr/spool/mail/*   mail
     /etc/motd           message of the day
     /etc/passwd         password file
     /etc/nologin        stops logins
     .hushlogin          makes login quieter

DIAGNOSTICS
     "Login incorrect," Username or password cannot be matched.

     "No Shell", "cannot open password file", "no directory":  consult a UNIX
     system programming counselor.

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.

SEE ALSO
     mail(1), passwd(1), rlogin(1c), sh(1), passwd(5), environ(7), init(8),
     getty(8), shutdown(8)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026