2016-03-08 03:07:46 -06:00
|
|
|
.TH AGETTY 8 "February 2016" "util-linux" "System Administration"
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH NAME
|
|
|
|
agetty \- alternative Linux getty
|
2006-12-06 17:25:34 -06:00
|
|
|
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH SYNOPSIS
|
2013-06-03 03:04:43 -05:00
|
|
|
.B agetty
|
2014-12-14 13:45:29 -06:00
|
|
|
[options]
|
|
|
|
.IR port " [" baud_rate "...] [" term ]
|
2006-12-06 17:25:34 -06:00
|
|
|
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.ad
|
|
|
|
.fi
|
2006-12-06 17:25:34 -06:00
|
|
|
\fBagetty\fP opens a tty port, prompts for a login name and invokes
|
2013-06-14 04:46:09 -05:00
|
|
|
the /bin/login command. It is normally invoked by \fBinit\fP(8).
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2006-12-06 17:25:34 -06:00
|
|
|
\fBagetty\fP has several \fInon-standard\fP features that are useful
|
2013-06-14 04:46:09 -05:00
|
|
|
for hardwired and for dial-in lines:
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:32 -06:00
|
|
|
Adapts the tty settings to parity bits and to erase, kill,
|
|
|
|
end-of-line and uppercase characters when it reads a login name.
|
|
|
|
The program can handle 7-bit characters with even, odd, none or space
|
2016-03-08 03:07:46 -06:00
|
|
|
parity, and 8-bit characters with no parity. The following special
|
2012-11-22 04:23:53 -06:00
|
|
|
characters are recognized: Control-U (kill); DEL and
|
2013-06-14 04:46:09 -05:00
|
|
|
backspace (erase); carriage return and line feed (end of line).
|
2015-01-19 19:11:52 -06:00
|
|
|
See also the \fB\-\-erase\-chars\fP and \fB\-\-kill\-chars\fP options.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:32 -06:00
|
|
|
Optionally deduces the baud rate from the CONNECT messages produced by
|
|
|
|
Hayes(tm)-compatible modems.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:32 -06:00
|
|
|
Optionally does not hang up when it is given an already opened line
|
|
|
|
(useful for call-back applications).
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:34 -06:00
|
|
|
Optionally does not display the contents of the \fI/etc/issue\fP file.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:34 -06:00
|
|
|
Optionally displays an alternative issue file instead of \fI/etc/issue\fP.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:34 -06:00
|
|
|
Optionally does not ask for a login name.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:32 -06:00
|
|
|
Optionally invokes a non-standard login program instead of
|
|
|
|
\fI/bin/login\fP.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2016-03-08 03:07:46 -06:00
|
|
|
Optionally turns on hardware flow control.
|
2013-06-10 14:48:41 -05:00
|
|
|
.IP \(bu
|
2006-12-06 17:25:32 -06:00
|
|
|
Optionally forces the line to be local with no need for carrier detect.
|
|
|
|
.PP
|
|
|
|
This program does not use the \fI/etc/gettydefs\fP (System V) or
|
|
|
|
\fI/etc/gettytab\fP (SunOS 4) files.
|
|
|
|
.SH ARGUMENTS
|
|
|
|
.na
|
|
|
|
.nf
|
|
|
|
.fi
|
|
|
|
.ad
|
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
.I port
|
|
|
|
A path name relative to the \fI/dev\fP directory. If a "\-" is
|
2006-12-06 17:25:34 -06:00
|
|
|
specified, \fBagetty\fP assumes that its standard input is
|
2006-12-06 17:25:32 -06:00
|
|
|
already connected to a tty port and that a connection to a
|
|
|
|
remote user has already been established.
|
|
|
|
.sp
|
2011-05-10 10:35:23 -05:00
|
|
|
Under System V, a "\-" \fIport\fP argument should be preceded
|
|
|
|
by a "\-\-".
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
.IR baud_rate ,...
|
|
|
|
A comma-separated list of one or more baud rates. Each time
|
2006-12-06 17:25:34 -06:00
|
|
|
\fBagetty\fP receives a BREAK character it advances through
|
2006-12-06 17:25:32 -06:00
|
|
|
the list, which is treated as if it were circular.
|
|
|
|
.sp
|
|
|
|
Baud rates should be specified in descending order, so that the
|
2013-06-14 04:46:09 -05:00
|
|
|
null character (Ctrl\-@) can also be used for baud-rate switching.
|
2013-06-03 03:04:43 -05:00
|
|
|
.sp
|
2014-11-21 02:03:00 -06:00
|
|
|
This argument is optional and unnecessary for \fBvirtual terminals\fP.
|
|
|
|
.sp
|
|
|
|
The default for \fBserial terminals\fP is keep the current baud rate
|
2015-01-19 19:11:52 -06:00
|
|
|
(see \fB\-\-keep\-baud\fP) and if unsuccessful then default to '9600'.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
.I term
|
|
|
|
The value to be used for the TERM environment variable. This overrides
|
2006-12-06 17:25:32 -06:00
|
|
|
whatever init(8) may have set, and is inherited by login and the shell.
|
2013-06-03 03:04:43 -05:00
|
|
|
.sp
|
2013-06-14 04:46:09 -05:00
|
|
|
The default is 'vt100', or 'linux' for Linux on a virtual terminal,
|
|
|
|
or 'hurd' for GNU Hurd on a virtual terminal.
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH OPTIONS
|
|
|
|
.na
|
|
|
|
.nf
|
|
|
|
.fi
|
|
|
|
.ad
|
|
|
|
.TP
|
2011-04-10 05:16:14 -05:00
|
|
|
\-8, \-\-8bits
|
|
|
|
Assume that the tty is 8-bit clean, hence disable parity detection.
|
|
|
|
.TP
|
2011-05-09 08:52:39 -05:00
|
|
|
\-a, \-\-autologin \fIusername\fP
|
2011-08-04 11:37:25 -05:00
|
|
|
Log the specified user automatically in without asking for a login name and
|
2016-03-08 03:07:46 -06:00
|
|
|
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
|
2014-06-06 02:49:35 -05:00
|
|
|
behavior and then only \\u is replaced by the \fIusername\fP and no other
|
2011-08-04 11:37:25 -05:00
|
|
|
option is added to the login command line.
|
2011-05-09 08:52:39 -05:00
|
|
|
.TP
|
2011-04-10 05:16:14 -05:00
|
|
|
\-c, \-\-noreset
|
2013-06-14 04:46:09 -05:00
|
|
|
Don't reset terminal cflags (control modes). See \fBtermios\fP(3) for more
|
2010-08-18 02:29:59 -05:00
|
|
|
details.
|
|
|
|
.TP
|
2011-08-05 06:47:22 -05:00
|
|
|
\-E, \-\-remote
|
2013-06-14 04:46:09 -05:00
|
|
|
If an \fB\-H\fP \fIfakehost\fP option is given, then an \fB\-r\fP
|
|
|
|
\fIfakehost\fP option is added to the \fB/bin/login\fP command line.
|
2011-08-05 06:47:22 -05:00
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-f, \-\-issue\-file \fIissue_file\fP
|
2011-04-10 05:16:14 -05:00
|
|
|
Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
|
|
|
|
This allows custom messages to be displayed on different terminals.
|
|
|
|
The \-i option will override this option.
|
2007-07-18 17:29:13 -05:00
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-h, \-\-flow\-control
|
2016-03-08 03:07:46 -06:00
|
|
|
Enable hardware (RTS/CTS) flow control. It is left up to the
|
2006-12-06 17:25:32 -06:00
|
|
|
application to disable software (XON/XOFF) flow protocol where
|
|
|
|
appropriate.
|
|
|
|
.TP
|
2011-04-10 05:16:14 -05:00
|
|
|
\-H, \-\-host \fIlogin_host\fP
|
2013-06-14 04:46:09 -05:00
|
|
|
Write the specified \fIlogin_host\fP into the utmp file. (Normally,
|
2011-04-10 05:16:14 -05:00
|
|
|
no login host is given, since \fBagetty\fP is used for local hardwired
|
2016-03-08 03:07:46 -06:00
|
|
|
connections and consoles. However, this option can be useful for
|
2013-06-14 04:46:09 -05:00
|
|
|
identifying terminal concentrators and the like.)
|
2011-04-10 05:16:14 -05:00
|
|
|
.TP
|
|
|
|
\-i, \-\-noissue
|
2006-12-06 17:25:34 -06:00
|
|
|
Do not display the contents of \fI/etc/issue\fP (or other) before writing the
|
2016-03-08 03:07:46 -06:00
|
|
|
login prompt. Terminals or communications hardware may become confused
|
2006-12-06 17:25:32 -06:00
|
|
|
when receiving lots of text at the wrong baud rate; dial-up scripts
|
|
|
|
may fail if the login prompt is preceded by too much text.
|
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-I, \-\-init\-string \fIinitstring\fP
|
2006-12-06 17:25:33 -06:00
|
|
|
Set an initial string to be sent to the tty or modem before sending
|
2013-06-14 04:46:09 -05:00
|
|
|
anything else. This may be used to initialize a modem. Non-printable
|
2006-12-06 17:25:33 -06:00
|
|
|
characters may be sent by writing their octal code preceded by a
|
2013-06-14 04:46:09 -05:00
|
|
|
backslash (\\). For example, to send a linefeed character (ASCII 10,
|
|
|
|
octal 012), write \\012.
|
2014-05-19 03:59:54 -05:00
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
\-J, \-\-noclear
|
2014-05-19 03:59:54 -05:00
|
|
|
Do not clear the screen before prompting for the login name
|
|
|
|
(the screen is normally cleared).
|
2006-12-06 17:25:33 -06:00
|
|
|
.TP
|
2011-05-17 06:21:45 -05:00
|
|
|
\-l, \-\-login\-program \fIlogin_program\fP
|
2006-12-06 17:25:32 -06:00
|
|
|
Invoke the specified \fIlogin_program\fP instead of /bin/login.
|
|
|
|
This allows the use of a non-standard login program (for example,
|
|
|
|
one that asks for a dial-up password or that uses a different
|
|
|
|
password file).
|
|
|
|
.TP
|
2013-06-14 04:46:09 -05:00
|
|
|
\-L, \-\-local\-line[=\fImode\fP]
|
|
|
|
Control the CLOCAL line flag. The optional \fImode\fP argument is 'auto', 'always' or 'never'.
|
|
|
|
If the \fImode\fP argument is omitted, then the default is 'always'. If the
|
|
|
|
\-\-local\-line option is not given at all, then the default is 'auto'.
|
2013-05-23 02:25:06 -05:00
|
|
|
|
2013-10-03 06:05:43 -05:00
|
|
|
The \fImode\fP 'always' forces the line to be a local line with no need for carrier detect.
|
|
|
|
This can be useful when you have a locally attached terminal where the serial line
|
2013-06-14 04:46:09 -05:00
|
|
|
does not set the carrier-detect signal.
|
2013-05-23 02:25:06 -05:00
|
|
|
|
2013-10-03 06:05:43 -05:00
|
|
|
The \fImode\fP 'never' explicitly clears the CLOCAL flag from the line setting and
|
2013-06-14 04:46:09 -05:00
|
|
|
the carrier-detect signal is expected on the line.
|
2013-05-23 02:25:06 -05:00
|
|
|
|
2013-10-03 06:05:43 -05:00
|
|
|
The \fImode\fP 'auto' (agetty default) does not modify the CLOCAL setting
|
2013-06-14 04:46:09 -05:00
|
|
|
and follows the setting enabled by the kernel.
|
2006-12-06 17:25:41 -06:00
|
|
|
.TP
|
2011-05-17 06:21:45 -05:00
|
|
|
\-m, \-\-extract\-baud
|
2013-06-14 04:46:09 -05:00
|
|
|
Try to extract the baud rate from the CONNECT status message
|
2016-03-08 03:07:46 -06:00
|
|
|
produced by Hayes(tm)\-compatible modems. These status
|
2006-12-06 17:25:32 -06:00
|
|
|
messages are of the form: "<junk><speed><junk>".
|
2006-12-06 17:25:34 -06:00
|
|
|
\fBagetty\fP assumes that the modem emits its status message at
|
2006-12-06 17:25:32 -06:00
|
|
|
the same speed as specified with (the first) \fIbaud_rate\fP value
|
|
|
|
on the command line.
|
|
|
|
.sp
|
2013-06-14 04:46:09 -05:00
|
|
|
Since the \fB\-m\fP feature may fail on heavily-loaded systems,
|
2006-12-06 17:25:32 -06:00
|
|
|
you still should enable BREAK processing by enumerating all
|
|
|
|
expected baud rates on the command line.
|
2016-03-08 03:07:46 -06:00
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-n, \-\-skip\-login
|
2016-03-08 03:07:46 -06:00
|
|
|
Do not prompt the user for a login name. This can be used in
|
2013-06-14 04:46:09 -05:00
|
|
|
connection with the \fB\-l\fP option to invoke a non-standard login process such
|
2016-03-08 03:07:46 -06:00
|
|
|
as a BBS system. Note that with the \-n option, \fBagetty\fR gets no input from
|
2013-06-14 04:46:09 -05:00
|
|
|
the user who logs in and therefore won't be able to figure out parity,
|
2016-03-08 03:07:46 -06:00
|
|
|
character size, and newline processing of the connection. It defaults to
|
2006-12-06 17:25:34 -06:00
|
|
|
space parity, 7 bit characters, and ASCII CR (13) end-of-line character.
|
|
|
|
Beware that the program that \fBagetty\fR starts (usually /bin/login)
|
|
|
|
is run as root.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2014-05-19 03:59:54 -05:00
|
|
|
\-N, \-\-nonewline
|
|
|
|
Do not print a newline before writing out /etc/issue.
|
|
|
|
.TP
|
2013-06-14 04:46:09 -05:00
|
|
|
\-o, \-\-login\-options "\fIlogin_options\fP"
|
2011-05-09 08:52:39 -05:00
|
|
|
Options that are passed to the login program. \\u is replaced
|
2016-03-08 03:07:46 -06:00
|
|
|
by the login name. The default \fB/bin/login\fP command line
|
2011-08-04 11:37:25 -05:00
|
|
|
is "/bin/login -- <username>".
|
|
|
|
|
|
|
|
Please read the SECURITY NOTICE below if you want to use this.
|
2011-05-09 08:52:39 -05:00
|
|
|
.TP
|
2011-05-17 06:21:45 -05:00
|
|
|
\-p, \-\-login\-pause
|
2011-05-09 08:52:39 -05:00
|
|
|
Wait for any key before dropping to the login prompt. Can be combined
|
|
|
|
with \fB\-\-autologin\fP to save memory by lazily spawning shells.
|
|
|
|
.TP
|
2013-06-14 04:46:09 -05:00
|
|
|
\-r, \-\-chroot \fIdirectory\fP
|
2013-04-05 05:55:20 -05:00
|
|
|
Change root to the specified directory.
|
|
|
|
.TP
|
2011-05-09 08:52:36 -05:00
|
|
|
\-R, \-\-hangup
|
2013-06-14 04:46:09 -05:00
|
|
|
Call vhangup() to do a virtual hangup of the specified terminal.
|
2011-05-09 08:52:36 -05:00
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-s, \-\-keep\-baud
|
2016-03-08 03:07:46 -06:00
|
|
|
Try to keep the existing baud rate. The baud rates from
|
2011-04-10 05:16:14 -05:00
|
|
|
the command line are used when agetty receives a BREAK character.
|
|
|
|
.TP
|
|
|
|
\-t, \-\-timeout \fItimeout\fP
|
2006-12-06 17:25:32 -06:00
|
|
|
Terminate if no user name could be read within \fItimeout\fP
|
2013-06-14 04:46:09 -05:00
|
|
|
seconds. This option should probably not be used with hardwired
|
2006-12-06 17:25:32 -06:00
|
|
|
lines.
|
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-U, \-\-detect\-case
|
2013-06-14 04:46:09 -05:00
|
|
|
Turn on support for detecting an uppercase-only terminal. This setting
|
|
|
|
will detect a login name containing only capitals as indicating an
|
|
|
|
uppercase-only terminal and turn on some upper-to-lower case conversions.
|
|
|
|
Note that this has no support for any Unicode characters.
|
2008-03-03 10:52:59 -06:00
|
|
|
.TP
|
2011-05-10 10:35:23 -05:00
|
|
|
\-w, \-\-wait\-cr
|
2006-12-06 17:25:34 -06:00
|
|
|
Wait for the user or the modem to send a carriage-return or a
|
|
|
|
linefeed character before sending the \fI/etc/issue\fP (or other) file
|
2016-03-08 03:07:46 -06:00
|
|
|
and the login prompt. Very useful in connection with the \-I option.
|
2011-04-10 05:16:14 -05:00
|
|
|
.TP
|
2011-09-12 07:24:27 -05:00
|
|
|
\-\-nohints
|
|
|
|
Do not print hints about Num, Caps and Scroll Locks.
|
|
|
|
.TP
|
2011-05-17 06:21:45 -05:00
|
|
|
\-\-nohostname
|
2011-05-10 10:35:23 -05:00
|
|
|
By default the hostname will be printed. With this option enabled,
|
|
|
|
no hostname at all will be shown.
|
|
|
|
.TP
|
|
|
|
\-\-long\-hostname
|
|
|
|
By default the hostname is only printed until the first dot. With
|
2013-06-08 13:10:41 -05:00
|
|
|
this option enabled, the fully qualified hostname by gethostname()
|
|
|
|
or (if not found) by getaddrinfo() is shown.
|
2011-05-10 10:35:23 -05:00
|
|
|
.TP
|
2012-11-22 04:14:02 -06:00
|
|
|
\-\-erase\-chars \fIstring\fP
|
2013-06-08 13:10:41 -05:00
|
|
|
This option specifies additional characters that should be interpreted as a
|
|
|
|
backspace ("ignore the previous character") when the user types the login name.
|
|
|
|
The default additional \'erase\' has been \'#\', but since util-linux 2.23
|
|
|
|
no additional erase characters are enabled by default.
|
2012-11-22 04:14:02 -06:00
|
|
|
.TP
|
|
|
|
\-\-kill\-chars \fIstring\fP
|
2013-06-08 13:10:41 -05:00
|
|
|
This option specifies additional characters that should be interpreted as a
|
|
|
|
kill ("ignore all previous characters") when the user types the login name.
|
|
|
|
The default additional \'kill\' has been \'@\', but since util-linux 2.23
|
|
|
|
no additional kill characters are enabled by default.
|
2012-11-22 04:14:02 -06:00
|
|
|
.TP
|
2014-05-19 03:59:54 -05:00
|
|
|
\-\-chdir \fIdirectory\fP
|
|
|
|
Change directory before the login.
|
|
|
|
.TP
|
|
|
|
\-\-delay \fInumber\fP
|
|
|
|
Sleep seconds before open tty.
|
|
|
|
.TP
|
|
|
|
\-\-nice \fInumber\fP
|
|
|
|
Run login with this priority.
|
|
|
|
.TP
|
2014-07-03 10:44:41 -05:00
|
|
|
\-\-reload
|
|
|
|
Ask all running agetty instances to reload and update their displayed prompts,
|
2016-03-08 03:07:46 -06:00
|
|
|
if the user has not yet commenced logging in. After doing so the command will
|
|
|
|
exit. This feature might be unsupported on systems without Linux
|
2014-07-03 10:44:41 -05:00
|
|
|
.BR inotify (7).
|
|
|
|
.TP
|
2011-04-10 05:16:14 -05:00
|
|
|
\-\-version
|
2013-06-08 13:10:41 -05:00
|
|
|
Display version information and exit.
|
2011-04-10 05:16:14 -05:00
|
|
|
.TP
|
|
|
|
\-\-help
|
2013-06-08 13:10:41 -05:00
|
|
|
Display help text and exit.
|
2006-12-06 17:25:33 -06:00
|
|
|
.PP
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH EXAMPLES
|
2006-12-06 17:25:35 -06:00
|
|
|
This section shows examples for the process field of an entry in the
|
|
|
|
\fI/etc/inittab\fP file. You'll have to prepend appropriate values
|
|
|
|
for the other fields. See \fIinittab(5)\fP for more details.
|
2006-12-06 17:25:34 -06:00
|
|
|
|
2013-06-14 04:46:09 -05:00
|
|
|
For a hardwired line or a console tty:
|
2013-06-10 14:42:06 -05:00
|
|
|
|
|
|
|
.RS
|
2006-12-06 17:25:34 -06:00
|
|
|
/sbin/agetty 9600 ttyS1
|
2013-06-10 14:42:06 -05:00
|
|
|
.RE
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2013-06-14 04:46:09 -05:00
|
|
|
For a directly connected terminal without proper carrier-detect wiring
|
2006-12-06 17:25:34 -06:00
|
|
|
(try this if your terminal just sleeps instead of giving you a password:
|
2013-06-14 04:46:09 -05:00
|
|
|
prompt):
|
2013-06-10 14:42:06 -05:00
|
|
|
|
|
|
|
.RS
|
2006-12-06 17:25:34 -06:00
|
|
|
/sbin/agetty \-L 9600 ttyS1 vt100
|
2013-06-10 14:42:06 -05:00
|
|
|
.RE
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2013-06-14 04:46:09 -05:00
|
|
|
For an old-style dial-in line with a 9600/2400/1200 baud modem:
|
2013-06-10 14:42:06 -05:00
|
|
|
|
|
|
|
.RS
|
2006-12-06 17:25:34 -06:00
|
|
|
/sbin/agetty \-mt60 ttyS1 9600,2400,1200
|
2013-06-10 14:42:06 -05:00
|
|
|
.RE
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2013-06-14 04:46:09 -05:00
|
|
|
For a Hayes modem with a fixed 115200 bps interface to the machine
|
2006-12-06 17:25:34 -06:00
|
|
|
(the example init string turns off modem echo and result codes, makes
|
2016-03-08 03:07:46 -06:00
|
|
|
modem/computer DCD track modem/modem DCD, makes a DTR drop cause a
|
2013-06-14 04:46:09 -05:00
|
|
|
disconnection, and turns on auto-answer after 1 ring):
|
2013-06-10 14:42:06 -05:00
|
|
|
|
|
|
|
.RS
|
2006-12-06 17:25:34 -06:00
|
|
|
/sbin/agetty \-w \-I 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1
|
2013-06-10 14:42:06 -05:00
|
|
|
.RE
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2011-05-09 08:52:39 -05:00
|
|
|
.SH SECURITY NOTICE
|
2011-05-17 06:21:45 -05:00
|
|
|
If you use the \fB\-\-login\-program\fP and \fB\-\-login\-options\fP options,
|
|
|
|
be aware that a malicious user may try to enter lognames with embedded options,
|
2016-03-08 03:07:46 -06:00
|
|
|
which then get passed to the used login program. Agetty does check
|
2011-05-10 10:35:23 -05:00
|
|
|
for a leading "\-" and makes sure the logname gets passed as one parameter
|
2011-05-09 08:52:39 -05:00
|
|
|
(so embedded spaces will not create yet another parameter), but depending
|
|
|
|
on how the login binary parses the command line that might not be sufficient.
|
2016-11-01 13:40:33 -05:00
|
|
|
Check that the used login program cannot be abused this way.
|
2011-05-09 08:52:39 -05:00
|
|
|
.PP
|
2011-05-10 10:35:23 -05:00
|
|
|
Some programs use "\-\-" to indicate that the rest of the commandline should
|
2016-03-08 03:07:46 -06:00
|
|
|
not be interpreted as options. Use this feature if available by passing "\-\-"
|
2011-05-10 10:35:23 -05:00
|
|
|
before the username gets passed by \\u.
|
2011-05-09 08:52:39 -05:00
|
|
|
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH ISSUE ESCAPES
|
2016-03-08 03:07:46 -06:00
|
|
|
The issue-file (\fI/etc/issue\fP, or the file set with the \fB\-f\fP option)
|
2013-06-14 04:46:09 -05:00
|
|
|
may contain certain escape codes to display the system name, date, time
|
|
|
|
etcetera. All escape codes consist of a backslash (\\) immediately
|
2016-03-08 03:07:46 -06:00
|
|
|
followed by one of the characters listed below.
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2012-09-13 05:54:36 -05:00
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
4 or 4{\fIinterface\fR}
|
|
|
|
Insert the IPv4 address of the specified network interface (for example: \\4{eth0}).
|
|
|
|
If the \fIinterface\fR argument is not specified, then select the first fully
|
|
|
|
configured (UP, non-LOCALBACK, RUNNING) interface. If not any configured
|
|
|
|
interface is found, fall back to the IP address of the machine's hostname.
|
2012-09-13 05:54:36 -05:00
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
6 or 6{\fIinterface\fR}
|
2014-05-13 08:07:08 -05:00
|
|
|
The same as \\4 but for IPv6.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
b
|
|
|
|
Insert the baudrate of the current line.
|
|
|
|
.TP
|
|
|
|
d
|
|
|
|
Insert the current date.
|
|
|
|
.TP
|
2016-03-08 03:07:46 -06:00
|
|
|
e or e{\fIname\fR}
|
|
|
|
Translate the human-readable \fIname\fP to an escape sequence and insert it
|
|
|
|
(for example: \\e{red}Alert text.\\e{reset}). If the \fIname\fR argument is
|
|
|
|
not specified, then insert \\033. The currently supported names are: black,
|
|
|
|
blink, blue, bold, brown, cyan,
|
2016-02-17 05:53:20 -06:00
|
|
|
darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen,
|
|
|
|
lightmagenta, lightred, magenta, red, reset, reverse, and yellow. All unknown
|
|
|
|
names are silently ignored.
|
2016-02-11 05:33:57 -06:00
|
|
|
.TP
|
2006-12-06 17:25:32 -06:00
|
|
|
s
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the system name (the name of the operating system). Same as `uname \-s'.
|
|
|
|
See also the \\S escape code.
|
2013-09-12 05:44:09 -05:00
|
|
|
.TP
|
|
|
|
S or S{VARIABLE}
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the VARIABLE data from \fI/etc/os-release\fP. If this file does not exist
|
|
|
|
then fall back to \fI/usr/lib/os-release\fP. If the VARIABLE argument is not
|
|
|
|
specified, then use PRETTY_NAME from the file or the system name (see \\s).
|
2013-09-12 05:44:09 -05:00
|
|
|
This escape code allows to keep \fI/etc/issue\fP distribution and release
|
|
|
|
independent. Note that \\S{ANSI_COLOR} is converted to the real terminal
|
|
|
|
escape sequence.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
l
|
|
|
|
Insert the name of the current tty line.
|
|
|
|
.TP
|
|
|
|
m
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the architecture identifier of the machine. Same as `uname \-m'.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
n
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the nodename of the machine, also known as the hostname. Same as `uname \-n'.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
o
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the NIS domainname of the machine. Same as `hostname \-d'.
|
2007-06-28 18:50:50 -05:00
|
|
|
.TP
|
|
|
|
O
|
|
|
|
Insert the DNS domainname of the machine.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
r
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the release number of the OS. Same as `uname \-r'.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
t
|
|
|
|
Insert the current time.
|
|
|
|
.TP
|
|
|
|
u
|
|
|
|
Insert the number of current users logged in.
|
|
|
|
.TP
|
|
|
|
U
|
|
|
|
Insert the string "1 user" or "<n> users" where <n> is the number of current
|
|
|
|
users logged in.
|
2013-06-14 04:46:09 -05:00
|
|
|
.TP
|
2006-12-06 17:25:32 -06:00
|
|
|
v
|
2016-03-08 03:07:46 -06:00
|
|
|
Insert the version of the OS, e.g. the build-date etc.
|
2013-06-10 14:55:45 -05:00
|
|
|
.PP
|
2016-03-08 03:07:46 -06:00
|
|
|
An example. On my system, the following \fI/etc/issue\fP file:
|
2013-06-10 14:55:45 -05:00
|
|
|
.sp
|
2006-12-06 17:25:32 -06:00
|
|
|
.na
|
2013-06-10 14:55:45 -05:00
|
|
|
.RS
|
2006-12-06 17:25:32 -06:00
|
|
|
.nf
|
|
|
|
This is \\n.\\o (\\s \\m \\r) \\t
|
2013-06-10 14:55:45 -05:00
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
.PP
|
2013-06-14 04:46:09 -05:00
|
|
|
displays as:
|
2013-06-10 14:55:45 -05:00
|
|
|
.sp
|
|
|
|
.RS
|
|
|
|
.nf
|
2006-12-06 17:25:32 -06:00
|
|
|
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
|
|
|
|
.fi
|
2013-06-10 14:55:45 -05:00
|
|
|
.RE
|
2006-12-06 17:25:32 -06:00
|
|
|
|
|
|
|
.SH FILES
|
|
|
|
.na
|
2013-06-10 14:58:25 -05:00
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /var/run/utmp
|
2013-06-10 14:58:25 -05:00
|
|
|
the system status file.
|
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /etc/issue
|
2013-06-10 14:58:25 -05:00
|
|
|
printed before the login prompt.
|
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /etc/os-release /usr/lib/os-release
|
2013-09-12 05:44:09 -05:00
|
|
|
operating system identification data.
|
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /dev/console
|
2013-06-10 14:58:25 -05:00
|
|
|
problem reports (if syslog(3) is not used).
|
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /etc/inittab
|
2013-09-12 05:44:09 -05:00
|
|
|
\fIinit\fP(8) configuration file for SysV-style init daemon.
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH BUGS
|
|
|
|
.ad
|
|
|
|
.fi
|
2013-06-14 04:46:09 -05:00
|
|
|
The baud-rate detection feature (the \fB\-m\fP option) requires that
|
2006-12-06 17:25:34 -06:00
|
|
|
\fBagetty\fP be scheduled soon enough after completion of a dial-in
|
2016-03-08 03:07:46 -06:00
|
|
|
call (within 30 ms with modems that talk at 2400 baud). For robustness,
|
2013-06-14 04:46:09 -05:00
|
|
|
always use the \fB\-m\fP option in combination with a multiple baud
|
2006-12-06 17:25:32 -06:00
|
|
|
rate command-line argument, so that BREAK processing is enabled.
|
|
|
|
|
2006-12-06 17:25:34 -06:00
|
|
|
The text in the \fI/etc/issue\fP file (or other) and the login prompt
|
2006-12-06 17:25:32 -06:00
|
|
|
are always output with 7-bit characters and space parity.
|
|
|
|
|
2013-06-14 04:46:09 -05:00
|
|
|
The baud-rate detection feature (the \fB\-m\fP option) requires that
|
2006-12-06 17:25:32 -06:00
|
|
|
the modem emits its status message \fIafter\fP raising the DCD line.
|
|
|
|
.SH DIAGNOSTICS
|
|
|
|
.ad
|
|
|
|
.fi
|
|
|
|
Depending on how the program was configured, all diagnostics are
|
|
|
|
written to the console device or reported via the syslog(3) facility.
|
|
|
|
Error messages are produced if the \fIport\fP argument does not
|
2006-12-06 17:25:33 -06:00
|
|
|
specify a terminal device; if there is no utmp entry for the
|
2006-12-06 17:25:32 -06:00
|
|
|
current process (System V only); and so on.
|
2013-06-03 03:04:43 -05:00
|
|
|
.SH AUTHORS
|
|
|
|
.UR werner@suse.de
|
|
|
|
Werner Fink
|
|
|
|
.UE
|
|
|
|
.br
|
|
|
|
.UR kzak@redhat.com
|
|
|
|
Karel Zak
|
|
|
|
.UE
|
|
|
|
.sp
|
|
|
|
The original
|
|
|
|
.B agetty
|
|
|
|
for serial terminals was written by W.Z. Venema <wietse@wzv.win.tue.nl>
|
|
|
|
and ported to Linux by Peter Orbaek <poe@daimi.aau.dk>.
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2007-07-02 18:17:04 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The agetty command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
https://www.kernel.org/pub/linux/utils/util\-linux/.
|