sulogin(8) -- Linux man page
NAMEsulogin -- Single-user login
SYNOPSISsulogin [ -e ] [ -p ] [ -t timeout ] [ tty-device ]
DESCRIPTIONsulogin can be invoked by init(8) when the system goes into single user mode (this is done through an entry in inittab(5)). Init also tries to execute sulogin when it is passed the -b flag from the bootmonitor (eg, LILO).
The user is prompted
Give root password for system maintenance
(or type Control-D for normal startup):
sulogin will connected to the current terminal, or to the optional device that can be specified on the command line (typically /dev/console).
If the -p flag was set, the single-user shell will be invoked with a dash as the first character in argv. That will cause most shells to behave as a login shell. The default is not to do this, so that the shell will not read /etc/profile or $HOME/.profile at startup.
ENVIRONMENT VARIABLESsulogin looks for the environment variable SUSHELL or sushell to determine what shell to start. If the environment variable is not set, it will try to execute root's shell from /etc/passwd. If that fails it will fall back to /bin/sh.
This is very valuable together with the -b flag to init. To boot the system into single user mode, with the root file system mounted read/write, using a special "failsafe" shell that is statically linked (this example is valid for the LILO bootprompt)
FALLBACK METHODSsulogin checks the root password using the standard methods first. If the -e option was specified, sulogin examines the next files to find the root password. If they are damaged, or non-existant, it will use fallback methods that even go so far as to provide you with a shell prompt without asking for the root password if they are irrepairably damaged.
AUTHORMiquel van Smoorenburg <email@example.com>
SEE ALSOinit(8), inittab(5).