login(1) login(1)NAME login - signs you on a terminal session SYNOPSIS login [name [env-var...]] ARGUMENTS env-var Specifies the environment variable you wish to add to the default ``environment.'' This option may take either the form xxx or xxx=yyy. If this option is used without an equal sign, the variable is 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. Variable definitions containing an = are placed into the environment without modification. If they already appear in the environment, then they replace the older value. name Specifies the name of the person who is logging in to the system. DESCRIPTION login 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 connection 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, if it is the Bourne shell, sh(1). For the C shell, csh(1), and the Korn shell, ksh(1), you may just type: login [user] The login command asks for your user name (if not supplied as an argument), and, if appropriate, your password. Echoing is turned off (when possible) during the typing of your password, so it will not appear on the written record of the session. January 1992 1
login(1) login(1)At some installations, an option may be invoked that will require you to enter a second dialup password. This will occur only for dialup connections, and will be prompted by the message: dialup password: Both passwords are required for a successful login. If you do not complete the login successfully within a certain period of time (for example, one minute), you are likely to be disconnected silently. Note that login does a sleep to settle the line and waits for a few seconds before accepting your input. If it misses the first character of your input, type it slower. After a successful login, accounting files are updated, the procedure /etc/profile is performed for users whose login shell is either sh or ksh, and the message-of-the-day, if any, is printed. Then, the user ID, the group ID, the working directory, and the command interpreter are initialized, according to specifications found in the /etc/passwd file entry for the user. If the command interpreter is sh, the file .profile, if it exists, in the initial working directory is executed. To indicate that this invocation of the command interpreter is the login shell, the name of the interpreter is prefixed with a minus sign (-), (for example, -sh). If the last field in the password file is empty, then the default command interpreter, the Bourne shell (/bin/sh) is used. If the last field is *, then a chroot is done to the directory named in the directory field of the entry. 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'' (see environ(5)) 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 login command will not change the variables PATH and SHELL in order to prevent users from spawning secondary shells with fewer security restrictions. 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. 2 January 1992
login(1) login(1)EXAMPLES At the beginning of each terminal session, the following sort of message is displayed on the screen Apple Computer A/UX login: to which a user name is the appropriate response. STATUS MESSAGES AND VALUES Login incorrect If the user name or the password cannot be matched. No shell cannot open password file no directory Consult a system administrator. No utmp entry. You must exec login from the If you attempted to execute login as a command without using the shell's exec internal command (sh(1) only) or from other than the login shell (sh(1) and ksh(1)). FILES /bin/login Executable file /etc/utmp Accounting file /etc/wtmp Accounting file /etc/motd File containing message-of-the-day entries /etc/passwd Password file /etc/profile Systemwide personal profile files for (sh(1) and ksh(1)) /etc/cshrc Systemwide personal csh startup file for (csh(1)) $HOME/.profile Personal profile file for (sh(1) and ksh(1)) $HOME/.login Personal file for csh startup used at login time (csh(1)) $HOME/.cshrc Personal csh startup file for (csh(1)) $HOME/.logout Personal csh logout file used at logout time for (csh(1)) /usr/mail/name January 1992 3
login(1) login(1)Mailbox file for user name SEE ALSO csh(1), ksh(1), mail(1), newgrp(1), rlogin(1N), sh(1), su(1) getty(1M), init(1M) in A/UX System Administrator's Reference passwd(4), profile(4), environ(5) in A/UX Programmer's Reference A/UX Essentials A/UX Shells and Shell Programming 4 January 1992