Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ loginwindow(8) — NeXTSTEP 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

utmp(5)

login(8)

ttys(5)

passwd(5)

LOGINWINDOW(8)  —  UNIX Programmer’s Manual

NAME

loginwindow − allow user to log in on console

SYNOPSIS

/usr/bin/loginwindow [ −LoginHook progname ] [ −LogoutHook progname ] [ −HostName hostname ] [ −ImageFile filename ] [ −DefaultUser username ] [ −PowerOffDisabled true ]

DESCRIPTION

loginwindow is the login front end for the console of the NeXTSTEP(tm) environment.  It allows the user to enter his login name and password, verifies those against the passwd database, and executes the Workspace program as that user. 

If there is an account for the user ’me’, and that account has no password, then the loginwindow program does not actually go through the login procedure; rather, it immediately executes the Workspace for that user.  This can be disabled by holding down the left mouse button while loginwindow is starting. 

If the user has an entry for the ’Workspace’ parameter for the program ’loginwindow’ in his defaults database, that program will be executed instead of Workspace.  The workspace program is invoked with the command line

Workspace -LoginProgram YES

If the user name of ’exit’ is given, with no password, then loginwindow immediately exits with status 0.  If the user name of ’console’ is given, then loginwindow immediately exits with status 1.  This may be used in conjunction with the onerror feature of the ttys file. 

Before execing the Workspace program, loginwindow reads the following user parameters from the user’s default database and places them in effect via the evs driver:

MouseScaling
InitialKeyRepeat
KeyRepeat
ClickTime
ClickSpace
AutoDimTime
MouseHandedness
MouseButtonsTied

It also looks up the following two user parameters and places them in effect for the duration of the user’s login session:

PublicWindowServer
umask

It also clears the Pasteboard. 

PublicWindowServer
is a parameter indicating whether unrestricted access to the window server on this machine should be allkowed while the user is logged in.  If it is YES, then any client on any machine may connect to the window server.  Otherwise, only processes descending from the Workspace or special system processes such as the printer daemon will be allowed to connect.

umask
gives an integer indicating the user’s desired default umask. See the umask(2) call for more information. 

After the user has logged out, loginwindow clears the Pasteboard again and resets these parameters to their default values before logging in another user.  See the Preferences application to reset these parameters. 

Options:

Note: Like other NeXTSTEP(tm) applications, loginwindow may accept these options on the command line or as a line in the defaults database of the user running the program, which for loginwindow is usually root. 

−LoginHook <progname>
provides a program for loginwindow to call before allowing a user to log in.  This program, if specified, will be called after the user’s name and password have been verified aginst the passwd database.  The intention of this hook is to allow system administrators to do logging of the user and necessary bookkeeping with the Unix databases such as wtmp if desired.  By default, loginwindow does handle the utmp database, but not the other activities performed by the terminal oriented login program (e.g., maintaining the wtmp database).  The program is called with its first argument as the user name of the person logging in.  If the hook program exits with return code 0, the user will be logged in; otherwise the login will be prevented.  The LoginHook program should be specified as a full pathname.  Also, it is not called when the default user (’me’) is logged in without being asked for a password. 

loginwindow is usally run as the program on the console tty from the /etc/ttys file. 

−LogoutHook <progname>
provides a program for loginwindow to call after a user has logged out.  The program is invoked with the name of the user who just logged out as its first argument.  Like the LoginHook, the program should be given by its full pathname, and it is not called when the single-user account (default ’me’) is logged out. 

−HostName <hostname>
provides a host name to be displayed in the loginwindow. If such a name is provided, it is drawn centered in the window, 153 pixels up from the bottom edge. If the host name provided is localhost, then the default host name is obtained from a gethostname call and that name is used instead. 

−ImageFile <filename>
provides an alternate file to use as the background of the window used by loginwindow.  Normally, it loads the file /usr/lib/nextlogin.tiff and displays that as the background for loginwindow.  The file used should contain an image 650 pixels wide by 230 pixels high.  The image should contain two 156 pixel wide by 23 pixel high white rectangles:  one at location (242,100) within the image, and one at location (242,53) within the image (these are the rectangles where the name and password are entered).  Subject to these restrictions, the rest of the image may contain whatever is desired.  See the Icon program for help in creating TIFF files. 

−DefaultUser <username>
provides for designating any particular username as the name to use when checking for single-user status (see the description of the treatment of the me account above).  If the DefaultUser option is given, then that user name, rather than me, will be checked, and if it has no password, it will be logged in. 

−PowerOffDisabled true
allows the System Administrator to prevent users from casually powering down the system.  If this option is supplied, then pressing the power key while loginwindow is active has no affect. Additionally, if the user presses the power key while in the Workspace, then the Workspace will exit but the system will not be powered down.  This may be used to make it less likely for users to casually power down a system that is providing some shared service, e.g., a print server. 

If this is done, system administrators may wish to allow the system to be powered down under password control.  A quick way to do this is to create a user named ’power’, assign a suitable password to that user, and set the user’s loginwindow.Workspace default value to be /etc/fasthalt -p. 

FILES

/etc/utmpuser/terminal database
/etc/ttysterminal configuration file
/etc/haltprogram used to shut down system
~/.NeXT/.NeXTdefaults.Dfiles for user’s defaults
~/.NeXT/.NeXTdefaults.L
/usr/lib/NextStep/Workspace.app Default location of Workspace
/usr/lib/NextStep/nextlogin.tiffDefault image file

SEE ALSO

utmp(5), login(8), ttys(5), passwd(5)
NeXTSTEP Network and System Administration manual

BUGS

utmp handling should be in the Hook program. 

4th Berkeley Distribution  —  January 12, 1989

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