version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SULOGIN |
|
|
2 |
!!!SULOGIN |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
ENVIRONMENT VARIABLES |
|
|
7 |
FALLBACK METHODS |
|
|
8 |
AUTHOR |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
sulogin -- Single-user login |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__sulogin__ [[ __-e__ ] [[ __-p__ ] [[ __-t |
|
|
19 |
timeout__ ] [[ __tty-device__ ] |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
''sulogin'' is invoked by __init(8)__ when the system |
|
|
24 |
goes into single user mode (this is done through an entry in |
|
|
25 |
''inittab(5)''). __Init__ also tries to execute |
|
|
26 |
''sulogin'' when it is passed the __-b__ flag from the |
|
|
27 |
bootmonitor (eg, LILO). |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
The user is prompted |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
Give root password for system maintenance |
|
|
34 |
(or type Control-D for normal startup): |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
''sulogin'' will connected to the current terminal, or to |
|
|
38 |
the optional device that can be specified on the command |
|
|
39 |
line (typically __/dev/console__). |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
If the __-p__ flag was set, the single-user shell will be |
|
|
43 |
invoked with a ''dash'' as the first character in |
|
|
44 |
''argv[[0]''. That will cause most shells to behave as a |
|
|
45 |
login shell. The default is ''not'' to do this, so that |
|
|
46 |
the shell will ''not'' read __/etc/profile__ or |
|
|
47 |
__$HOME/.profile__ at startup. |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
After the user exits the single-user shell, or presses |
|
|
51 |
control-d at the prompt, the system will (continue to) boot |
|
|
52 |
to the default runlevel. |
|
|
53 |
!!ENVIRONMENT VARIABLES |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
''sulogin'' looks for the environment variable |
|
|
57 |
__SUSHELL__ or __sushell__ to determine what shell to |
|
|
58 |
start. If the environment variable is not set, it will try |
|
|
59 |
to execute root's shell from /etc/passwd. If that fails it |
|
|
60 |
will fall back to __/bin/sh__. |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
This is very valuable together with the __-b__ flag to |
|
|
64 |
init. To boot the system into single user mode, with the |
|
|
65 |
root file system mounted read/write, using a special |
|
|
66 |
__ |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
boot: linux -b rw sushell=/sbin/sash |
|
|
70 |
!!FALLBACK METHODS |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
''sulogin'' checks the root password using the standard |
|
|
74 |
methods first. If the __-e__ option was specified, |
|
|
75 |
''sulogin'' examines the next files to find the root |
|
|
76 |
password. If they are damaged, or non-existant, it will use |
|
|
77 |
fallback methods that even go so far as to provide you with |
|
|
78 |
a shell prompt without asking for the root password if they |
|
|
79 |
are irrepairably damaged. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
/etc/passwd, |
|
|
83 |
/etc/shadow (if present) |
|
|
84 |
!!AUTHOR |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
Miquel van Smoorenburg |
|
|
88 |
!!SEE ALSO |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
init(8), inittab(5). |
|
|
92 |
---- |