Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Login(1M) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(1M)

getty(1M)

startmac(1M)

csh(1)

getopt(1)

ksh(1)

login(1)

mail(1)

passwd(1)

newgrp(1)

sh(1)

passwd(4)

profile(4)

environ(5)




Login(1M) Login(1M)
NAME Login - logs you in to A/UX by using a graphical user interface SYNOPSIS Login [startmac-options] [-- [-g] [-r]] ARGUMENTS -- (An argument consisting of two hyphens.) Delimits the end of the startmac options and the beginning of the command options specifically for Login, as required by getopt (see getopt(1) and getopt(3C)). -g Allows you to log in to the guest account (if it exists) without entering the password. When you are in the guest account, clicking the Guest radio button causes the word guest to be automatically entered into the name field and causes the password field to be hidden. -r Removes the normal UNIX(Reg.) System V password restrictions. See passwd(1) for a list of the restrictions. startmac-options Represents any of the options offered by startmac that you wish to establish for Login (see startmac(1M)). The Login command uses some of the same startup code as startmac. DESCRIPTION Login presents a dialog box through which you can log in to A/UX. When you select the appropriate menu items, Login leads you through several more dialog boxes that help you change your password and your session type. The session type establishes the operating interface, such as a Finder interface or the emulation of a console terminal, that is in effect after you log in. Once the account name and password you enter are verified, Login updates various accounting files and switches to the home directory, user ID, and group ID for the account as specified in the /etc/passwd file. The operating environment that replaces Login is either a command-line interface (Console Emulator) or a Macintosh Finder interface. In contrast with other UNIX systems, A/UX runs /etc/loginrc instead of /etc/getty for the system console device as specified in the file /etc/inittab. After it is invoked by init, the loginrc script invokes Login as opposed to running /bin/login, so that the Macintosh interface support is available while logging in. January 1992 1



Login(1M) Login(1M)
If /etc/loginrc cannot safely execute Login for any reason, it invokes getty to present the usual character-based login interface that accompanies most UNIX systems. To establish a character-based login interface as the default interface for use with the system console device, you can alter /etc/inittab so that the console login process is supported by /etc/getty. You must do this while operating with the root account. You can establish other preferences affecting the login process as described in the ``Arguments'' section. Logging in to A/UX Through Login 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 an account named guest. Normally, two editable fields (also called text boxes) labeled Name and Password are shown. If the Guest radio button is enabled and is clicked, the word ``guest'' is automatically entered into the Name field. The Login button at the bottom of the dialog box is initially disabled. Its initial disabled state allows you to use the RETURN key instead of the mouse. For example, you can type the account name and press the RETURN key, which moves the insertion point into the Password field. (Pressing the TAB key or clicking in the Password field also moves the insertion point into this field.) Once the insertion point has been moved out of the Name field, the Login button is enabled. The keyboard equivalent of clicking the Login button is pressing RETURN. Thus, you can log in to the system without using the mouse, by typing a valid login name and pressing RETURN, then typing the correct password and pressing RETURN. After the name and password have been checked, the password-aging information (if any) inside the appropriate record in /etc/passwd is examined. (See passwd(4) for more information about password aging.) If the password has expired, or if the account has no password but requires one, a dialog box appears, asking you to enter a new password. Once you enter a valid new password and click the OK button, another dialog box appears, asking you to retype the new password for verification. After typing the new password again, you can click the Login button. If you choose Change Password from the Options menu, the password-aging information is examined to ensure that the password is changeable and that at least the minimum number 2 January 1992



Login(1M) Login(1M)
of weeks have passed since the password was last modified. A new dialog box appears as described earlier. Menu Items In addition to the Login dialog box, Login displays menus titled Options and Special in the menu bar. This section describes the actions performed by the menu items: Apple menu. This menu contains the customary items as well as the ``About Login'' item, which displays a dialog box that offers version information. Options menu. The following items are available in the Options menu: Change Password Presents a dialog box with fields soliciting the account name, old password, and new password. However, if an examination of the password-aging information reveals that the password is unchangeable because the minimum number of weeks has not yet passed since the password was last modified, an alert is displayed in place of the Change Password dialog box. The alert explains the password-aging restriction. (See passwd(4) for more information about password aging.) After you click the OK button in the first dialog box, a second dialog box appears, asking you to type the password again for verification. When you enter the password again and click the OK button, the Login dialog reappears with your latest password already entered. Change Session Type Presents a dialog box that allows you to change your session type. This dialog box also includes a Password field. This field initially contains the same value, if any, that you entered in the Login dialog box. Additional buttons allow you to choose between a Console Emulator session type, a Finder session type to support 24-bit clean Macintosh applications, a Finder session type to support 32-bit clean Macintosh applications, and, when applicable, an X11 session type to support an X Window System interface. After you click the OK button in the dialog box, the Login dialog reappears, indicating the session type along with any password entry you supplied. Special menu. This menu is analogous to the Special menu available through the Finder. It contains menu items that let you shut down and restart the system. January 1992 3



Login(1M) Login(1M)
Restart Presents a dialog box asking for the password to that of the root account (for security purposes). If other users are logged in or other systems are mounting Network File System (NFS) partitions from this system, it also asks for a message to send to those users and a time period to delay before restarting. After the message is sent and the delay period has ended, the system is restarted. Shut Down Shuts down A/UX. Its function is similar to the Restart menu item, except that the system remains shut off. Session Types The Login command supports a range of session types or environments you can choose from within the Options Menu. (See ``Options Menu'' earlier in the ``Description'' section.) A/UX Finder (32-bit) is the default. The list of session-type options is built based upon the existence of Macintosh resource files. The /mac/lib/sessiontypes directory contains files that specify session-type information. There is one file per session type. Each file is a Macintosh resource file containing one string list whose ID is 128. The string list contains four strings, specifying the following information: ⊕ The name of the session type to be displayed in the list in the Change Session Types dialog box. ⊕ The expanded description of the session type to be displayed in the Change Session Types dialog box while this session type is selected. ⊕ The pathname to a command file that supports this particular type of session. This pathname is supplied as an argument for the -c shell command option. ⊕ The name of a program file in your home directory to be used as the startup command for this particular type of session, overriding the preceding one if this file exists. This program file permits a more customized session to be invoked under the guise of one of those listed in the Change Session Types dialog box. For A/UX Finder (24-bit) and A/UX Finder (32-bit) session types, these values are .mac24 and .mac32, respectively. 4 January 1992



Login(1M) Login(1M)
How Login Helps Initialize A/UX Besides supporting a graphical user interface for the login process, Login performs an important role in the A/UX boot process in terms of readying the system for use. After validating that the account name and password are correct, Login reinitializes the Macintosh virtual machine state. Since this initialization can be done only when the Macintosh environment is not already running, you cannot enter Login as a command as you can login (see login(1)). For security reasons, no desk accessories are available while Login is running. Before exiting, Login hides the Login dialog box and changes the ownership and modes of /dev/console and /dev/uinter0 (the Macintosh user interface driver) so that only you can run Macintosh applications. (Users logged in across a network cannot run Macintosh programs for numerous reasons.) It also changes the ownership and modes of any Macintosh hierarchical file system (HFS) disk partitions so that they can be shown as icons on the desktop in the Finder. Finally, Login performs a call to exec (described in exec(2)) in order to run an initial command-interpreting shell, which in turn is used to start the session type, as described in ``Session Types'' earlier in the ``Description'' section. To indicate that this invocation of the command interpreter is the login shell, the name of the shell is prefixed with a minus sign, such as -sh, as can be seen when you enter the following line: ps -f -u username If the command interpreter field in the password file is empty, then the default command interpreter, the Bourne shell ( /bin/sh), is run. If the shell specified in /etc/passwd is among those listed in /etc/shells, Login passes the command obtained from the resource file for a given session type as an argument to the -c option of the shell (as described in ``Session Types'' in the ``Description'' section). If the Console Emulator session type was made your preference, the -c option is not used, nor is an initial command run to establish the support for a particular operating interface (other than the shell itself). The basic environment (described in environ(5)) is initialized as follows: HOME=login-directory January 1992 5



Login(1M) Login(1M)
PATH=/bin:/usr/bin:/usr/ucb:/mac/bin LOGNAME=login-name TERM=mac2 SHELL=last-field-of-passwd-entry MAIL=/usr/mail/login-name FINDER_EDITOR=/mac/bin/TextEditor EDITOR=/usr/bin/vi DISPLAY=host-name:0.0 Most of these variables establish preference settings that customize the command-interpretation process (see csh(1), ksh(1), sh(1)). Notable exceptions are those preference settings that affect the Finder. For example, FINDER_EDITOR contains the pathname of the editing application that is launched when you double-click (or otherwise open) a text document icon from within the Finder. Session Type Maintenance Login determines the available session types by looking for resource files located in the directory /mac/lib/sessiontypes. You can create such resource files by compiling source code using the rez utility. For example, the resource file for the A/UX Finder (32-bit) session type was compiled from the following source code: 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" } }; This example code can be compiled to produce a file equivalent to /mac/lib/sessiontypes/mac32, by saving it in file and then entering a command of this format: /mac/bin/rez -i /:mac:lib:rincludes types.r file FILES /etc/cshrc System-wide startup file interpreted upon initial running of csh /etc/motd 6 January 1992



Login(1M) Login(1M)
Text file containing the message-of-the-day, which is typically used for system identification /etc/passwd Password file /etc/profile System-wide startup file interpreted upon initial running of sh and ksh /etc/shells Text file specifying the shell programs that are capable of supporting all session types /etc/utmp Accounting file in binary format /etc/wtmp Accounting file in binary format $HOME/.cshrc Personal startup file for csh $HOME/.login Personal startup file interpreted at login time for csh $HOME/.logout Personal file interpreted when you log out of a login, csh shell $HOME/.profile Personal startup file interpreted at login time for sh and ksh /mac/bin/Login Executable file /mac/bin/%Login Resource file /mac/lib/sessiontypes/* Resource files for every session type /usr/mail/name File containing a mailbox for the user account of the given name SEE ALSO init(1M), getty(1M), startmac(1M) csh(1), getopt(1), ksh(1), login(1), mail(1), passwd(1), newgrp(1), sh(1) in A/UX Command Reference passwd(4), profile(4), environ(5) in A/UX Programmer's Reference A/UX Essentials January 1992 7

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