]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/sulogin.8
7998b4acacfd106d17bf4493d820ee9848af85f5
[thirdparty/util-linux.git] / login-utils / sulogin.8
1 .\" Copyright (C) 1998-2006 Miquel van Smoorenburg.
2 .\" Copyright (C) 2012 Karel Zak <kzak@redhat.com>
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" "July 2014" "util-linux" "System Administration"
19 .SH NAME
20 sulogin \- single-user login
21 .SH SYNOPSIS
22 .BR sulogin " [options]"
23 .RI [ tty ]
24 .SH DESCRIPTION
25 .B sulogin
26 is invoked by
27 .B init
28 when the system goes into single-user mode.
29 .PP
30 The user is prompted:
31 .IP "" .5i
32 Give root password for system maintenance
33 .br
34 (or type Control\-D for normal startup):
35 .PP
36 If the root account is locked and --force is specified, no password is required.
37 .PP
38 .B sulogin
39 will be connected to the current terminal, or to the optional \fItty\fR device that
40 can be specified on the command line (typically
41 .IR /dev/console ).
42 .PP
43 When the user exits from the single-user shell, or presses control\-D at the
44 prompt, the system will continue to boot.
45 .SH OPTIONS
46 .IP "\fB\-e\fR, \fB\-\-force\fP"
47 If the default method of obtaining the root password from the system via
48 .BR getpwnam (3)
49 fails, then examine
50 .I /etc/passwd
51 and
52 .I /etc/shadow
53 to get the password. If these files are damaged or nonexistent, or when
54 root account is locked by '!' or '*' at the begin of the password then
55 .B sulogin
56 will \fBstart a root shell without asking for a password\fP.
57 .PP
58 .IP
59 Only use the
60 .B \-e
61 option if you are sure the console is physically protected against
62 unauthorized access.
63 .IP "\fB\-p\fR, \fB\-\-login\-shell\fP"
64 Specifying this option causes
65 .B sulogin
66 to start the shell process as a login shell.
67 .IP "\fB\-t\fR, \fB\-\-timeout \fIseconds\fP"
68 Specify the maximum amount of time to wait for user input. By default,
69 .B sulogin
70 will wait forever.
71 .IP "\fB\-h\fR, \fB\-\-help\fP"
72 Display help text and exit.
73 .IP "\fB\-V\fR, \fB\-\-version\fP"
74 Display version information and exit.
75 .SH ENVIRONMENT VARIABLES
76 .B sulogin
77 looks for the environment variable
78 .B SUSHELL
79 or
80 .B sushell
81 to determine what shell to start. If the environment variable is not set, it
82 will try to execute root's shell from
83 .IR /etc/passwd .
84 If that fails, it
85 will fall back to
86 .IR /bin/sh .
87 .SH AUTHOR
88 .B sulogin
89 was written by Miquel van Smoorenburg for sysvinit and later ported
90 to util-linux by Dave Reisner and Karel Zak.
91 .SH AVAILABILITY
92 The sulogin command is part of the util-linux package and is available from
93 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
94 Linux Kernel Archive
95 .UE .