AUTOLOGIN(8L)

NAME
autologin - create an automatic login session from /etc/inittab

SYNOPSIS
/usr/local/etc/autologin [ -u ] [ -c command ] [ -e env=val ] [ -g group ] [ -l login ] [ -t tty ]

DESCRIPTION
Autologin creates a login session for login by running an `su - login' on the specified device (tty). If a command is given, that command is executed via `su - login -c command.'

Autologin also changes the ownership of the tty port to the user and sets the mode to 0600.

On AIX, autologin uses getuserattr(3) to determine which groups are required to su to login and sets those groups for the process before executing the su(1) command.

OPTIONS

-ccommand
    Execute the command command. The default action is to create a login shell.

-eenv=val
    Add the evironment variable assignment env=val to the environment.

-ggroup
    Add group to current process group set before running su(1). This option probably isn't necessary since the group set should be properly handled through the use of getuserattr(3).

-llogin
    Create the login process for the user login. If none is given the effective uid is used.

-ttty
    tty is the name of the character-special file that corresponds to the terminal to be logged in. If none is given the current controlling terminal is used.

-u  Don't create a utmp entry. Normally, an entry is written to /etc/utmp to maintain a record of users logged into the system.

EXAMPLES
Adding the following line to /etc/inittab on an AIX machine establishes a root login on the console terminal (/dev/tty0) with any error messages directed to /dev/console:
    cons2:2:respawn:/usr/local/etc/autologin -t/dev/tty0 -lroot > /dev/console 2>&1

Adding the following line to /etc/inittab on an AIX machine causes ssinfo to be logged in on /dev/tty10 with the TERM environment variable set to reg20:
    ss10:2:respawn:/usr/local/etc/autologin -e TERM=reg20 -t/dev/tty10 -lssinfo

Adding the following line to /etc/ttytab on a Sun 4.1.x machine establishes a root login on the console device:
    console "/usr/local/etc/autologin -lroot -t" xterm on local secure

Note that init provides the tty argument on the end of the command.

FILES
/bin/su
/etc/inittab
/etc/passwd
/etc/utmp

SEE ALSO
su(1), getuserattr(3), inittab(5), init(8).

AUTHOR
Jeff W. Stewart - Purdue University Computing Center

BUGS
Doesn't add entries to /usr/adm/wtmp??
Doesn't add utmp entry unless it's been setup by init(8).
Only runs on SUN4, EPIX, SUN3, IBMR2 (currently).