Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ login(1) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mail(1)

sh(1)

newgrp(1M)

su(1M)

loginlog(4)

passwd(4)

profile(4)

environ(5)



          login(1)             INTERACTIVE UNIX System             login(1)



          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 CTRL-D to indicate an ``end-of-file.''

               If login is invoked as a command, it must replace the ini-
               tial 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.

               If you make a mistake in the login procedure you will
               receive the message:

                    Login incorrect

               and a new login prompt will appear.  If you make five
               incorrect login attempts, all five may be logged in
               /usr/adm/loginlog (if it exists) and the line will be
               dropped.

               If you do not complete the login successfully within a cer-
               tain period of time (e.g., 1 minute), you will probably be
               silently disconnected.

               After a successful login, the user ID, the group IDs, the
               working directory, and the command interpreter (usually
               sh(1) or csh(1)) are initialized.  If the shell /bin/sh is
               running, accounting files are updated, the procedure
               /etc/profile is performed, the message-of-the-day (if any)
               is printed, and the file .profile in the working directory
               is executed, if it exists.  If the shell /bin/csh is run-
               ning, the .login and .cshrc files in the working directory
               are executed, if they exist.  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


          Rev. 1.3                                                   Page 1





          login(1)             INTERACTIVE UNIX System             login(1)



               the password file is empty, then the default command inter-
               preter /bin/sh is used.  If this field is *, then the named
               directory becomes the root directory, the starting point for
               path searches for path names beginning with a slash (/).  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

               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 exceptions.  The variables HOME,
               PATH, SHELL, MAIL, IFS, TZ, HZ, CDPATH, and LOGNAME 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 conventions.  Typing a backslash in
               front of a character quotes it and allows the inclusion of
               such things as spaces and tabs.

          FILES
               /etc/utmp            accounting
               /etc/wtmp            accounting
               /usr/mail/your-name  mailbox for user your-name
               /usr/adm/loginlog    record of failed login attempts
               /etc/motd            message-of-the-day
               /etc/passwd          password file
               /etc/profile         system profile (/bin/sh only)
               .profile             user's login profile (/bin/sh only)

          SEE ALSO
               mail(1), sh(1), newgrp(1M), su(1M).
               loginlog(4), passwd(4), profile(4), environ(5) in the
               INTERACTIVE SDS Guide and Programmer's Reference Manual.

          DIAGNOSTICS


          Rev. 1.3                                                   Page 2





          login(1)             INTERACTIVE UNIX System             login(1)



               login incorrect if the user name or the password cannot be
               matched.
               No shell, cannot open password file, or no directory:  con-
               sult a UNIX system programming counselor.
               No utmp entry.  If you attempted to execute login as a com-
               mand without using the shell's exec internal command or
               attempted to execute login as a command from a shell other
               than the initial shell, you must execute login from the
               lowest level shell.

          NOTES
               The file /etc/default/login contains special login informa-
               tion including the flag PASSREQ.  When PASSREQ is set to YES
               (PASSREQ=YES), users will be required to have a password.
               When a user without a password logs in and PASSREQ=YES, the
               user will be forced to add a password before the user is
               allowed access to the system.  One exception to this
               requirement is if password aging is turned on for the user
               and the NULL password has not been aged.  In this case, the
               user will be allowed to access the system without a password
               until the NULL password has been aged, or until the root
               user forces the password to be aged (passwd -f command).

          ADDED VALUE
               This entry, supplied by INTERACTIVE Systems Corporation,
               contains enhancements to UNIX System V.





























          Rev. 1.3                                                   Page 3



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