summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.8
diff options
context:
space:
mode:
authorKarel Zak2011-08-04 18:37:25 +0200
committerKarel Zak2011-08-08 12:07:07 +0200
commit9aeb66dc6b878bfb51bbcd4497107bc34e71b73d (patch)
treeaa0b9ada7e99a548c8004940fb7f4f14d2baf75e /term-utils/agetty.8
parentdocs: update TODO file (diff)
downloadkernel-qcow2-util-linux-9aeb66dc6b878bfb51bbcd4497107bc34e71b73d.tar.gz
kernel-qcow2-util-linux-9aeb66dc6b878bfb51bbcd4497107bc34e71b73d.tar.xz
kernel-qcow2-util-linux-9aeb66dc6b878bfb51bbcd4497107bc34e71b73d.zip
agetty: improve login(1) argv[]
* fix regression: missing username should not be reported (EPERM) if -n/--skip-login is given and username is NULL. * don't compose login options *string* if we can use argv *array* (the string is necessary only for --login-options). * don't overwrite --login-options by --autologin The old code silently ignores login-options and "login -f <username>" is always used. The new code uses: a) "login -f <username>" by default b) "login <login-options>" for --login-options + --autologin where for b) the username from "--autologin <username>" is used to replace \u magic string in <login-options>. * the \u could be used more than once in one login argv string, for example: agetty --login-options "-o user=\\u,name=\\u --foo" * the space in --login-options is correctly ignored, for example agetty --login-options " hello world ". Reviewed-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.8')
-rw-r--r--term-utils/agetty.815
1 files changed, 9 insertions, 6 deletions
diff --git a/term-utils/agetty.8 b/term-utils/agetty.8
index 4ccb28a14..c43f4561c 100644
--- a/term-utils/agetty.8
+++ b/term-utils/agetty.8
@@ -87,9 +87,11 @@ whatever init(8) may have set, and is inherited by login and the shell.
Assume that the tty is 8-bit clean, hence disable parity detection.
.TP
\-a, \-\-autologin \fIusername\fP
-Log the specified user automatically in without asking for a login
-name and password. Check the \-f option from
-\fB/bin/login\fP for this.
+Log the specified user automatically in without asking for a login name and
+password. The \-f \fIusername\fP option is added to the \fB/bin/login\fP
+command line by default. The \-\-login-options option changes this default
+behaviour and then only \\u is replaced by the \fIusername\fP and no other
+option is added to the login command line.
.TP
\-c, \-\-noreset
Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more
@@ -160,9 +162,10 @@ is run as root.
.TP
\-o, \-\-login\-options \fI"login_options"\fP
Options that are passed to the login program. \\u is replaced
-by the login name. Defaults to "-- \\u", which is suitable for
-\fB/bin/login\fP. Please read the SECURITY NOTICE below if
-you want to use this.
+by the login name. The default \fB/bin/login\fP command line
+is "/bin/login -- <username>".
+
+Please read the SECURITY NOTICE below if you want to use this.
.TP
\-p, \-\-login\-pause
Wait for any key before dropping to the login prompt. Can be combined