Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ login(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

users, adduser

csh

getty

init

passwd

pstart, penable, pshare, pdelay

passwd

utmp

login

PURPOSE

     Allows you to sign on to the system.

SYNOPSIS
     login  (not user invokable)


DESCRIPTION

     The login program logs you  onto the system.  Its primary
     functions are:

     o   To validate your password.
     o   To make the required accounting and log entries.
     o   To set up your processing environment.
     o   To run  the command interpreter that  is specified in
         the password file, usually the sh program.

     A logger process, initially running the getty program, is
     started for each enabled port.   getty reads a login name
     and sets work station modes  (see "getty").  Then it runs
     login, which may ask for a  password.  If you do not have
     a password, press the Enter key.

     Your log in attempt might fail for the following reasons:

     o   Your login name/password pair does not match an entry
         in the password file.
     o   Your password  has expired.  This can  happen if your
         system requires that you change your password after a
         set number  of days.   In this  case, login  runs the
         passwd command  instead of letting you  log in.  (For
         more  information, see  "passwd.")  After you  change
         your password, you can attempt to log in again.
     o   The system  has reached  the limit  of simultaneously
         logged-in users.  Each AIX kernel sets a limit on the
         number of concurrent log  ins by nonprivileged users;
         this limit may be one.  A privileged user is one that
         has a  user ID from 0  to 20.  A privileged  user can
         log in at any time.

     In one special  case, login does not ask for  a user name
     and password  pair.  When the  login port is  the console
     and  the file  /etc/autolog contains  a valid  user name,
     login  creates a  login  session for  that user  automat-
     ically.  Other processing by login proceeds normally.

     When a user logs in successfully, the login program makes
     entries in /etc/utmp, the record of users logged into the
     system, and in  /usr/adm/wtmp (if it exists),  for use in
     accounting.  On invalid login  attempts (due to an incor-

     rect login name or password),  login makes entries in the
     /etc/.ilog file.

     Once you are  logged in to the system,  the login program
     lists your previous login time  and the system message of
     the day  (stored in the  /etc/motd file), if it  has been
     modified since your last log in  or if this is your first
     log in  of the day.  If  a user file size  limit has been
     specified  in the  passwd  file, the  limit  is set  with
     ulimit system call.   When you log in as user  root or su
     and the /etc/.ilog  file is not empty, you  see a message
     advising  the you  to  check the  /etc/.ilog  file for  a
     record of unsuccessful login attempts.

     The login  program sets the LOGNAME  and HOME environment
     variables from  information in the password  file.  Envi-
     ronment variables inherited from  getty and init (such as
     those specified  in /etc/environment) are kept.   You may
     expand or modify the  environment by supplying additional
     parameters  to login  when it  requests your  login name.
     These  may  take the  form  xxx  or xxx=yyy.   Parameters
     without an  equal sign are  placed in the  environment as
     Lnum=xxx, where num is a  number starting at 0 and incre-
     mented each time a new variable name is required.  Param-
     eters  containing  an  equal  sign are  placed  into  the
     environment without modification.  If they already exist,
     the new  assignment replaces the older  value.  There are
     two exceptions:   You cannot  change the  shell variables
     PATH  and  SHELL.   (This  restriction  prevents  people,
     logging into restricted  environments, from spawning sec-
     ondary shells  that are not restricted.)   Both login and
     getty  understand  simple single-character  quoting  con-
     ventions.  Typing a backslash (\) in front of a character
     quotes it and allows you to include such things as spaces
     and tab characters.

     The login  command changes the current  directory to your
     HOME directory,  changes the ownership of  the port (work
     station)  to  the  user  logging in,  sets  the  user-and
     group-IDs of the process, and then runs the program spec-
     ified for  the user  in the  password file,  normally the
     shell (/bin/sh).   login calls  this program with  a name
     consisting of -  (minus) followed by the  last segment of
     its path  name.  An instance  of the shell  can therefore
     determine from its invocation name  whether it is a login
     shell or a subshell.

     The /etc/passwd  file entry  may include  parameters that
     are  always  passed  to  the  shell  program.   For  more
     details,  see the  passwd  file in  AIX Operating  System
     Technical Reference.

FLAGS

     -rnode  Identifies the login as a remote login and speci-
             fies the node requesting the login.

FILES

     /etc/utmp        Accounting file.
     /usr/adm/wtmp    Accounting file.
     /etc/.ilog       Accounting file.
     /etc/autolog     Login ID for automatic login.
     /usr/motd        Message of the day.
     /etc/passwd      Password file.
     .llog            Date of last login.

RELATED INFORMATION

     The  following   commands:   "users,   adduser,"   "csh,"
     "getty,"  "init,"    "passwd,"  and    "pstart,  penable,
     pshare, pdelay."

     Note:   The csh  command contains  a built-in  subcommand
     named login.   The command  and subcommand do  not neces-
     sarily work the same way.  For information on the subcom-
     mand, see the csh command.

     The passwd and  utmp files in AIX  Operating System Tech-
     nical Reference.

     The  discussion of  login  sessions in  Managing the  AIX
     Operating System.

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