Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Login(1M) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(1M)

getty(1M)

login(1)

passwd(1)

passwd(4)

csh(1)

ksh(1)

sh(1)

mail(1)

newgrp(1)

profile(4)

environ(5)




Login(1M) Login(1M)
NAME Login - present a Macintosh(Reg.) login dialog box when called by init SYNOPSIS Login [-- [-r] [-g]] DESCRIPTION Login presents a Macintosh dialog box allowing a user to log into the system at the Macintosh display and optionally change his or her password. Additionally, it allows you to select which type of session to log in to (for example, A/UX Finder or Console Emulator). Login replaces the use of /etc/getty and /bin/login for the console terminal. Login is invoked instead of getty for the console terminal by loginrc which is invoked by init after the system has booted into multiuser mode and after the previous user has logged out. If Login fails to execute for any reason, either loginrc or Login invokes getty to prevent init from endless- ly respawning Login. Login reinitializes the Macintosh virtual machine state. Since this can only be done when the Macintosh environment is not already running, Login cannot be entered as a command from within a CommandShell window. Login runs as a standalone application rather than in a Mul- tiFinder environment so it can properly clean up its en- vironment when it executes the default shell of the user. For security reasons, no desk accessories are available while Login is running. The main login dialog box displayed by Login contains two radio buttons labeled Guest and Registered User, with the latter selected initially. The Guest button is enabled only if there is an entry in the /etc/passwd file for a user named Guest. Normally, two edit fields (also called text boxes) labelled Name and Password are shown. If the Guest radio button is enabled and is selected, the word Guest is automatically entered into the name field, unless the -g field is passed to Login. The -g flag specifies that the user does not need to enter the Guest password to log in to that account and hides the name and password fields. The Login button at the bottom of the dialog box is initial- ly disabled. This allows the user to enter his or her name and then press the RETURN key the get the password. (Press- ing the TAB key or clicking in the password field also works.) Once the user has entered his or her name and moved the text edit cursor to the password field, the Login button is enabled. Pressing the RETURN key again after entering April, 1990 1



Login(1M) Login(1M)
the password is equivalent to clicking the Login button and continues the login procedure. When the user's name and password are verified, Login up- dates accounting files and switches to the user's home directory, user ID, and group ID, as specified in the /etc/passwd file entry for the user. If the user selects the Login button, the password-aging in- formation (if any) in the password field of the user's entry in /etc/passwd is examined (see passwd(4)) for more informa- tion on password aging). If the password has expired, or if the user has no password but one is required, a dialog box is presented asking the user to enter a new password. Once the user enters a valid new password and selects the OK but- ton, another dialog box is presented asking the user to re- type the new password for verification. After typing the new password again, the user selects the Login button in this second dialog box to continue the login process. If the user selects the Set Password button in the main lo- gin dialog box rather than the Login button, the password- aging information is examined to ensure that the password is changeable by the user and that at least the minimum number of weeks have passed since the password was last modified. Dialog boxes are presented asking the user to enter his or her new password, as described above. Login then hides the main dialog box, changes the ownership and modes of /dev/console and /dev/uinter0 (the Macintosh user interface driver) so that only that user can execute Macintosh applications while he or she is logged in, and changes the ownership and modes of the Macintosh hierarchi- cal file system (HFS) disk partitions so that they show up on the user's desktop in the Finder. Finally, Login does an exec(2) of the user's command inter- preter or shell, which is specified in the /etc/passwd file entry for the user. To indicate that this invocation of the command interpreter is the login shell, the name of the in- terpreter is prefixed with a minus sign, for example, -sh. If the command interpreter field in the password file is empty, then the default command interpreter, the Bourne shell ( /bin/sh), is used. If the user's shell is a standard shell (as listed in /etc/shells) Login may pass the -c flag to the shell with an initial command that runs a Macintosh type session as speci- fied in the Options menu of Login. Session types include A/UX Finder (32-bit), A/UX Finder (24-bit), and Console Emu- lator. For the Console Emulator session type, the -c flag option is not required. See the discussion of session types 2 April, 1990



Login(1M) Login(1M)
below for more information. The basic environment (see environ(5)) is initialized to: HOME=your-login-directory PATH=:/bin:/usr/bin:/usr/ucb:/mac/bin LOGNAME=your-login-name TERM=mac2 SHELL=last-field-of-passwd-entry MAIL=/usr/mail/your-login-name FINDER_EDITOR=/mac/bin/TextEditor EDITOR=/usr/bin/vi DISPLAY=hostname:0.0 (used by the X Window System) The FINDER_EDITOR variable specifies which editor is invoked when the user double-clicks on a text document icon. EDITOR is used by many A/UX utilities. Menu Options In addition to the main dialog box, Login displays menus ti- tled Options and Special in addition to the Apple menu at the far left of the menu bar. The following sections describe the action performed by the various menu items. The Apple Menu About Login Display a dialog box that gives version information. The Options Menu Change Password Presents a dialog box with fields asking for the user's name, old password, and new password. The name and old password fields contain the information that the user had already typed into the name and password fields of the main dialog box. The cursor is positioned at the first blank field. When the user has entered the ap- propriate information and presses the OK button, the password aging information is examined to ensure that the password is changeable by the user and that at least the minimum number of weeks have passed since the password was last modified. If modification of the password is permitted, this dialog box is then closed and a second dialog box is presented asking the user to type his or her password for verification. After pressing the OK button in this second dialog box, the name and password fields on the main dialog are updated to reflect the user's changes. Change Session Type Presents a dialog box allowing the user to change his session type. This dialog box also has fields asking the user for his or her name and password. These fields are initialized to contain the same information as the user has already typed into the main dialog box, April, 1990 3



Login(1M) Login(1M)
if any. After pressing the OK button in the dialog box, the name and password fields in the the main dia- log box are updated to reflect the user's changes. The Special Menu This menu is somewhat analogous to the Finder's Special menu. It contains menu items to shut down and restart the system. Restart Present a dialog box asking for the root password (for security purposes). If other users are logged in or other systems are mounting NFS partions from this sys- tem, it also asks for a message to send to those users and a time period to delay before restarting. After the user has responded to the dialog box and the delay period has ended, the system is restarted. Shut Down Shuts down A/UX. It is similar to the Restart menu item, except that when the delay period has ended, it turns the machine off. FLAG OPTIONS Login is normally invoked only by loginrc(1M) which is in- voked by init(1M), as specified in /etc/inittab and /etc/loginrc. Only the superuser should have permission to modify /etc/inittab. Thus, only the superuser can change the behavior of Login by changing the command-line arguments that are passed to it. Login uses some of the same startup code as startmac(1M). Thus, Login accepts the startmac command-line arguments, which are processed by getopt(3C). See startmac(1M) for a description of these arguments. Login also takes additional command line arguments. To specify these, use the getopt special option -- (two hy- phens) to delimit the end of the startmac options. The ad- ditional Login options must follow this special option. The additional options are: -r Remove the normal UNIX(Reg.) System V password restrictions. See passwd(1) for a list of the restrictions. -g Allow users to log in to the Guest account (if it exists) without entering the password. Pass- ing this flag also causes the name and password fields to be hidden when the user chooses the Guest radio button. 4 April, 1990



Login(1M) Login(1M)
Session Types Login supports a range of session types or environments which the user may choose. The standard session types shipped with A/UX are A/UX Finder (32-bit), A/UX Finder (24-bit), and Console Emulator. A/UX Finder (32-bit) is the default, but the user can change session type as described under the Options menu. The /mac/lib/sessiontypes directory contains files which specify session type information. There is one file per session type. Each file is a Macintosh resources file con- taining one string list whose ID is 128. The string list contains four strings, specifying the following information: ⊕ Session type name displayed in the list in the Change Session Types dialog box. ⊕ Session type description displayed in the dialog box when the user selects the name. ⊕ Default session startup command, passed the shell with the -c flag option as the startup command. ⊕ Custom session startup command name, if a file of this name appears in the user's home directory, use it in- stead of the default session startup command. EXAMPLES The following is the resource file description used to create /mac/lib/sessiontypes/mac32, the A/UX Finder (32-bit) session type description file: resource 'STR# (128) { { "A/UX Finder (32-bit)"; "A/UX Finder (32-bit) is the normal" "session type. Macintosh applications " "that are not 32-bit clean will " "not run properly in this mode."; "/mac/bin/mac32"; ".mac32" } }; Resource file descriptions of this type can be compiled us- ing the following command: /mac/bin/rez -i /:mac:lib:rincludes types.r filename.r FILES /mac/bin/Login Login executable /mac/bin/%Login Login resource file April, 1990 5



Login(1M) Login(1M)
/mac/lib/sessiontypes Directory containing session type specification files /etc/shells List of standard shells /etc/utmp Accounting /etc/wtmp Accounting /etc/motd Message-of-the-day /etc/passwd Password file /etc/profile Systemwide profile for sh(1) and ksh(1) /etc/cshrc Systemwide profile for csh(1) $HOME/.profile Personal profile for sh(1) and ksh(1) $HOME/.login Personal profile used at login time for csh(1) $HOME/.cshrc Personal profile for csh(1) $HOME/.logout Personal profile used at logout for csh(1) /usr/mail/name Mailbox for user name SEE ALSO init(1M), getty(1M), login(1), passwd(1), passwd(4), csh(1), ksh(1), sh(1), mail(1), newgrp(1), profile(4), environ(5). A/UX Essentials. 6 April, 1990

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