Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12). It is
[sysvinit.git] / man / sulogin.8
1 '\" -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1998-2006 Miquel van Smoorenburg.
3 .\"
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
8 .\"
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 .\" GNU General Public License for more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software
16 .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 .\"
18 .TH SULOGIN 8 "17 Jan 2006" "" "Linux System Administrator's Manual"
19 .SH NAME
20 sulogin \- Single-user login
21 .SH SYNOPSIS
22 .B sulogin
23 [ \fB\-e\fP ]
24 [ \fB\-p\fP ]
25 [ \fB\-t\fP \fISECONDS\fP ]
26 [ \fITTY\fP ]
27 .SH DESCRIPTION
28 .I sulogin
29 is invoked by \fBinit(8)\fP when the system goes into single user mode.
30 (This is done through an entry in \fIinittab(5)\fP.)
31 \fBInit\fP also
32 tries to execute \fIsulogin\fP when
33 the boot loader (e.g., \fBgrub\fP(8))
34 passes it the \fB\-b\fP option.
35 .PP
36 The user is prompted
37 .IP "" .5i
38 Give root password for system maintenance
39 .br
40 (or type Control\-D for normal startup):
41 .PP
42 \fIsulogin\fP will be connected to the current terminal, or to the
43 optional device that can be specified on the command line
44 (typically \fB/dev/console\fP).
45 .PP
46 If the \fB\-t\fP option is used then the program only waits
47 the given number of seconds for user input.
48 .PP
49 If the \fB\-p\fP option is used then the single-user shell is invoked
50 with a \fIdash\fP as the first character in \fIargv[0]\fP.
51 This causes the shell process to behave as a login shell.
52 The default is \fInot\fP to do this,
53 so that the shell will \fInot\fP read \fB/etc/profile\fP
54 or \fB$HOME/.profile\fP at startup.
55 .PP
56 After the user exits the single-user shell,
57 or presses control\-D at the prompt,
58 the system will (continue to) boot to the default runlevel.
59 .SH ENVIRONMENT VARIABLES
60 \fIsulogin\fP looks for the environment variable \fBSUSHELL\fP or
61 \fBsushell\fP to determine what shell to start. If the environment variable
62 is not set, it will try to execute root's shell from /etc/passwd. If that
63 fails it will fall back to \fB/bin/sh\fP.
64 .PP
65 This is very valuable together with the \fB\-b\fP option to init. To boot
66 the system into single user mode, with the root file system mounted read/write,
67 using a special "fail safe" shell that is statically linked (this example
68 is valid for the LILO bootprompt)
69 .PP
70 boot: linux \-b rw sushell=/sbin/sash
71 .SH FALLBACK METHODS
72 \fIsulogin\fP checks the root password using the standard method (getpwnam)
73 first.
74 Then, if the \fB\-e\fP option was specified,
75 \fIsulogin\fP examines these files directly to find the root password:
76 .PP
77 /etc/passwd,
78 .br
79 /etc/shadow (if present)
80 .PP
81 If they are damaged or nonexistent, sulogin will start a root shell
82 without asking for a password. Only use the \fB\-e\fP option if you
83 are sure the console is physically protected against unauthorized access.
84 .SH AUTHOR
85 Miquel van Smoorenburg <miquels@cistron.nl>
86 .SH SEE ALSO
87 init(8), inittab(5).