.TH SULOGIN 8 "11 Sep 2000" "" "Linux System Administrator's Manual" .SH NAME sulogin -- Single-user login .SH SYNOPSIS .B sulogin .RB [ " -e " ] .RB [ " -p " ] .RB [ " -t timeout " ] .RB [ " tty-device " ] .SH DESCRIPTION .I sulogin is invoked by \fBinit(8)\fP when the system goes into single user mode (this is done through an entry in \fIinittab(5)\fP). \fBInit\fP also tries to execute \fIsulogin\fP when it is passed the \fB-b\fP flag from the bootmonitor (eg, LILO). .PP The user is prompted .IP "" .5i Give root password for system maintenance .br (or type Control-D for normal startup): .PP \fIsulogin\fP will connected to the current terminal, or to the optional device that can be specified on the command line (typically \fB/dev/console\fP). .PP If the \fB-p\fP flag was set, the single-user shell will be invoked with a \fIdash\fP as the first character in \fIargv[0]\fP. That will cause most shells to behave as a login shell. The default is \fInot\fP to do this, so that the shell will \fInot\fP read \fB/etc/profile\fP or \fB$HOME/.profile\fP at startup. .PP After the user exits the single-user shell, or presses control-d at the prompt, the system will (continue to) boot to the default runlevel. .SH ENVIRONMENT VARIABLES \fIsulogin\fP looks for the environment variable \fBSUSHELL\fP or \fBsushell\fP 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 \fB/bin/sh\fP. .PP This is very valuable together with the \fB-b\fP 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) .PP boot: linux -b rw sushell=/sbin/sash .SH FALLBACK METHODS \fIsulogin\fP checks the root password using the standard methods first. If the \fB-e\fP option was specified, \fIsulogin\fP 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. .PP /etc/passwd, .br /etc/shadow (if present) .SH AUTHOR Miquel van Smoorenburg .SH SEE ALSO init(8), inittab(5).