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