man(1) Manual page archive


     LOGIN(8)                                                 LOGIN(8)

     NAME
          login - sign on

     SYNOPSIS
          /etc/login name
          /etc/login -f name [ cmd ]
          /etc/login -p passwd-line [ cmd ]

     DESCRIPTION
          Login is executed by getty(8). See the Introduction to this
          volume for how to dial up initially.

          Login asks for a password if appropriate.  Echoing is turned
          off during the typing of the password.  The -f option forces
          login of the named user, without a password.  -p is similar
          to -f, but an entire line of password file information is
          supplied.

          Login initializes the userid, the groupid, and the working
          directory according to specifications found in the password
          file; see passwd(5). It also initializes environment vari-
          ables PATH and HOME .  Finally it executes a command inter-
          preter (usually sh(1)). Argument 0 of the command inter-
          preter is its name with a dash (`-') prepended.  If a cmd
          argument was present, two additional arguments -c cmd are
          passed, and environment variable REXEC is set to `1'.

          Upon a successful login, accounting files are updated and,
          if no options are present, the message of the day is printed
          and the user is informed of the existence of mail.

          Successful logins are recorded in and If cmd was present,
          `*' is appended to the login name in wtmp, and no record is
          made in utmp.

          Only the super-user may execute login.

     FILES
          accounting
          accounting
          mail
          message-of-the-day
          password file
          groups file

     SEE ALSO
          newgrp(1), passwd(1), environ(5), passwd(5), getty(8),
          init(8), su(8), svcmgr(8).

     DIAGNOSTICS

     LOGIN(8)                                                 LOGIN(8)

          `Login incorrect': the name or the password is bad.
          `No Shell' or `no directory': the initial shell or home
          directory specified in the password file does not exist.
          `Cannot open password file': things are badly curdled.

     BUGS
          Information passed to options -p and -f is not checked.
          Only trusted programs should run login. Only trusted pro-
          grams may usefully do so anyway; login has no privileges.