Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ login(1) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mail(1)

sh(1)

quota(1)

passwd(4)

group(4)

profile(4)

environ(5)

newgrp(1M)

su(1M)



LOGIN(1-SysV)       RISC/os Reference Manual        LOGIN(1-SysV)



NAME
     login - sign on

SYNOPSIS
     login [ name [ env-var ... ]]

DESCRIPTION
     The login command is used at the beginning of each terminal
     session and allows you to identify yourself to the system.
     It may be invoked as a command or by the system when a con-
     nection is first established.  Also, it is invoked by the
     system when a previous user has terminated the initial shell
     by typing a control-d to indicate an ``end-of-file.''

     If login is invoked as a command it must replace the initial
     command interpreter.  This is accomplished by typing:
          exec login
     from the initial shell.

     login asks for your user name (if not supplied as an argu-
     ment), and, if appropriate, your password.  Echoing is
     turned off (where possible) during the typing of your pass-
     word, so it will not appear on the written record of the
     session.

     At some installations, an option may be invoked that will
     require you to enter a second ``dialup'' password.  This
     will occur only for dial-up connections, and will be
     prompted by the message ``dialup password:''.  Both pass-
     words are required for a successful login.

     At some installations, an option may be invoked that will
     require you to set your password if you do not currently
     have one.  In that case, login will prompt you to supply a
     new password.

     If you do not complete the login successfully within a cer-
     tain period of time (e.g., one minute), you are likely to be
     silently disconnected.

     After a successful login, accounting files are updated, the
     procedure /etc/profile is performed, the message-of-the-day,
     if any, is printed, the user-ID, the group-ID, the working
     directory, and the command interpreter (usually sh(1)) is
     initialized, and for sh(1) the file .profile in the working
     directory is executed, if it exists.  These specifications
     are found in the /etc/passwd file entry for the user.  The
     name of the command interpreter is - followed by the last
     component of the interpreter's path name (i.e., -sh).  If
     this field in the password file is empty, then the default
     command interpreter, /bin/sh is used.  For information about
     other command interpreters (for example, csh(1)), see the



                         Printed 1/15/91                   Page 1





LOGIN(1-SysV)       RISC/os Reference Manual        LOGIN(1-SysV)



     appropriate manual pages.  If this field is ``*'', then the
     named directory becomes the root directory, the starting
     point for path searches for path names beginning with a /.
     At that point login is re-executed at the new level which
     must have its own root structure, including /etc/login and
     /etc/passwd.

     The basic environment is initialized to:

          HOME=your-login-directory
          PATH=:/bin:/usr/bin
          SHELL=last-field-of-passwd-entry
          MAIL=/usr/mail/your-login-name
          TZ=timezone-specification
          TERM=your-terminal-type
          LOGNAME=your-login-name
          USER=your-login-name

     The environment may be expanded or modified by supplying
     additional arguments to login, either at execution time or
     when login requests your login name.  The arguments may 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
     an = are placed into the environment without modification.
     If they already appear in the environment, then they replace
     the older value.  There are two exceptions.  The variables
     PATH and SHELL cannot be changed.  This prevents people,
     logging into restricted shell environments, from spawning
     secondary shells which are not restricted.  Both login and
     getty understand simple single-character quoting conven-
     tions.  Typing a backslash in front of a character quotes it
     and allows the inclusion of such things as spaces and tabs.

     If a file named /etc/login.nohome.ok exists, login will
     allow users to log in even if their home directory does not
     exist.  Such users' shell's current directory will be set to
     '/'.  This option should be enabled if compatibility with
     4.3 BSD login is desired.

     If a file named /etc/login.initgroups.ok exists, login will
     call initgroups() to enable simultaneous access to files
     belonging to all groups of which the user is a member (as
     specified in /etc/group).  This allows the user to avoid
     using newgrp.  This option should be enabled if compatibil-
     ity with 4.3 BSD login is desired.

     If a group named "tty" exists in /etc/group, and if a file
     named /etc/login.ttygroup.ok exists, login will change the
     group ownership of the controlling terminal to group "tty"



 Page 2                  Printed 1/15/91





LOGIN(1-SysV)       RISC/os Reference Manual        LOGIN(1-SysV)



     instead of to the user's primary group.  This option should
     be enabled if compatibility with the 4.3 BSD "Tahoe" release
     is desired.

     If a file named .hushlogin exists in a user's home direc-
     tory, login will not print any system messages, such as the
     message of the day.

     If the file /usr/adm/lastlog exists, login will maintain in
     it a database of the last login for each user, and will
     print a message giving the time and terminal of the last
     login.

     If the file /etc/nologin exists, login will not permit
     logins by users other than root, and will print the contents
     of /etc/nologin before exiting.

     If the file /etc/wtmp does not exist, but the file
     /usr/adm/wtmp does exist, login will use the latter for
     recording logins.

     If syslogd is running, login will log interesting events,
     such as repeated login failures or root logins, to syslogd,
     instead of directly to the console.

     If the file /etc/login.lastlogin.ok esists, login will main-
     tain a file .lastlogin in the each user's home directory,
     indicating when the user last logged in, and provide a mes-
     sage indicating the time of the last login.  Note that this
     feature is redundant if /usr/adm/lastlog exists; it is pro-
     vided for compatibility with certain other implementations.

     If the file /etc/dialups exists, and the name of the termi-
     nal line appears in the file, and the /etc/d_passwd exists,
     a dialup password will be required for logins on that line,
     if the shell of the user appears in /etc/d_passwd. The file
     /etc/dialups consists of a list of terminal names, such as
     ``/dev/ttyh1'', one per line.  The file /etc/d_passwd con-
     sists of a list of shell name-password pairs, in the style
     of a password file, such as ``/bin/sh:tbKLWjrc0MKmQ:'', one
     per line.  If the name of the user's shell does not appear
     in the file, or if the password field is empty
     (``/bin/sh::''), no password is required. The password, if
     present, is assumed to be encrypted in the same manner as
     passwords in /etc/passwd or /etc/group.

     If the file /etc/login.passreq.ok exists, login will require
     all users who do not have a password to supply one when they
     first login; this password will then be required for subse-
     quent logins.





                         Printed 1/15/91                   Page 3





LOGIN(1-SysV)       RISC/os Reference Manual        LOGIN(1-SysV)



     If the file /etc/login.root.console.ok exists, login will
     permit user root to login only on the system console.  The
     system console is defined as any character special file
     which matches the device number of the /dev/console special
     file.

     If the file /etc/login.quotawarn.ok exists, login will exe-
     cute /usr/ucb/quota to report the user's disk quota status.
     login, however, will skip running quota if .hushlogin exists
     in the user's home directory.

FILES
     /etc/utmp                accounting

     /etc/wtmp                accounting

     /usr/adm/wtmp            accounting (alternate name for
                              /etc/wtmp)

     /usr/mail/your-name      mailbox for user your-name

     /etc/motd                message-of-the-day

     /etc/passwd              password file

     /etc/group               group file

     /etc/profile             system profile

     .profile                 user's login profile (for sh)

     .hushlogin               disable login messages

     /etc/login.nohome.ok     enable login without home directory

     /etc/login.initgroups.ok enable use of initgroups()

     /etc/login.ttygroup.ok   enable setting terminal to group
                              tty

     /etc/nologin             disable non-root logins

     .lastlogin               record last login time

     /etc/login.lastlogin.ok  enable use of .lastlogin

     /etc/dialups             list of dialup lines

     /etc/d_passwd            list of dialup passwords for vari-
                              ous login shells

     /etc/login.passreq.ok    enable requiring passwords



 Page 4                  Printed 1/15/91





LOGIN(1-SysV)       RISC/os Reference Manual        LOGIN(1-SysV)



     /etc/login.root.console.ok
                              enable requiring root to login on
                              the system console

     /etc/login.quotawarn.ok  enable running /usr/ucb/quota to
                              check user quota status

SEE ALSO
     mail(1), sh(1), quota(1).
     passwd(4), group(4), profile(4), environ(5) in the
     Programmer's Reference Manual.
     newgrp(1M), su(1M) in the System Administrator's Reference
     Manual.

DIAGNOSTICS
     login incorrect
          if the user name or the password cannot be matched.

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

     No utmp entry. You must exec "login" from the lowest level "sh"
          if you attempted to execute login as a command without
          using the shell's exec internal command or from other
          than the initial shell.






























                         Printed 1/15/91                   Page 5



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