OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / SysVinit / original / man8 / sulogin.8
1 .TH SULOGIN 8 "11 Sep 2000" "" "Linux System Administrator's Manual"
2 .SH NAME
3 sulogin -- Single-user login
4 .SH SYNOPSIS
5 .B sulogin
6 .RB [ " -e " ]
7 .RB [ " -p " ]
8 .RB [ " -t timeout " ]
9 .RB [ " tty-device " ]
10 .SH DESCRIPTION
11 .I sulogin
12 is invoked by \fBinit(8)\fP when the system goes into single user mode
13 (this is done through an entry in \fIinittab(5)\fP). \fBInit\fP also
14 tries to execute \fIsulogin\fP when it is passed the \fB-b\fP flag
15 from the bootmonitor (eg, LILO).
16 .PP
17 The user is prompted
18 .IP "" .5i
19 Give root password for system maintenance
20 .br
21 (or type Control-D for normal startup):
22 .PP
23 \fIsulogin\fP will connected to the current terminal, or to the
24 optional device that can be specified on the command line
25 (typically \fB/dev/console\fP).
26 .PP
27 If the \fB-p\fP flag was set, the single-user shell will be invoked
28 with a \fIdash\fP as the first character in \fIargv[0]\fP. That will
29 cause most shells to behave as a login shell. The default is \fInot\fP
30 to do this, so that the shell will \fInot\fP read \fB/etc/profile\fP
31 or \fB$HOME/.profile\fP at startup.
32 .PP
33 After the user exits the single-user shell, or presses control-d at the
34 prompt, the system will (continue to) boot to the default runlevel.
35 .SH ENVIRONMENT VARIABLES
36 \fIsulogin\fP looks for the environment variable \fBSUSHELL\fP or
37 \fBsushell\fP to determine what shell to start. If the environment variable
38 is not set, it will try to execute root's shell from /etc/passwd. If that
39 fails it will fall back to \fB/bin/sh\fP.
40 .PP
41 This is very valuable together with the \fB-b\fP flag to init. To boot
42 the system into single user mode, with the root file system mounted read/write,
43 using a special "failsafe" shell that is statically linked (this example
44 is valid for the LILO bootprompt)
45 .PP
46 boot: linux -b rw sushell=/sbin/sash
47 .SH FALLBACK METHODS
48 \fIsulogin\fP checks the root password using the standard methods first.
49 If the \fB-e\fP option was specified,
50 \fIsulogin\fP examines the next files to find the root password. If
51 they are damaged, or non-existant, it will use fallback methods that
52 even go so far as to provide you with a shell prompt without asking
53 for the root password if they are irrepairably damaged.
54 .PP
55 /etc/passwd,
56 .br
57 /etc/shadow (if present)
58 .SH AUTHOR
59 Miquel van Smoorenburg <miquels@cistron.nl>
60 .SH SEE ALSO
61 init(8), inittab(5).