3
agetty \- alternative Linux getty
6
.BR "agetty " [\-c8ihLmnsUw]
7
.RI "[-f " issue_file ]
8
.RI "[-l " login_program ]
11
.RI "[-H " login_host ]
19
\fBagetty\fP opens a tty port, prompts for a login name and invokes
20
the /bin/login command. It is normally invoked by \fIinit(8)\fP.
22
\fBagetty\fP has several \fInon-standard\fP features that are useful
23
for hard-wired and for dial-in lines:
25
Adapts the tty settings to parity bits and to erase, kill,
26
end-of-line and uppercase characters when it reads a login name.
27
The program can handle 7-bit characters with even, odd, none or space
28
parity, and 8-bit characters with no parity. The following special
29
characters are recognized: @ and Control-U (kill); #, DEL and
30
back space (erase); carriage return and line feed (end of line).
32
Optionally deduces the baud rate from the CONNECT messages produced by
33
Hayes(tm)-compatible modems.
35
Optionally does not hang up when it is given an already opened line
36
(useful for call-back applications).
38
Optionally does not display the contents of the \fI/etc/issue\fP file.
40
Optionally displays an alternative issue file instead of \fI/etc/issue\fP.
42
Optionally does not ask for a login name.
44
Optionally invokes a non-standard login program instead of
47
Optionally turns on hard-ware flow control
49
Optionally forces the line to be local with no need for carrier detect.
51
This program does not use the \fI/etc/gettydefs\fP (System V) or
52
\fI/etc/gettytab\fP (SunOS 4) files.
60
A path name relative to the \fI/dev\fP directory. If a "-" is
61
specified, \fBagetty\fP assumes that its standard input is
62
already connected to a tty port and that a connection to a
63
remote user has already been established.
65
Under System V, a "-" \fIport\fP argument should be preceded
69
A comma-separated list of one or more baud rates. Each time
70
\fBagetty\fP receives a BREAK character it advances through
71
the list, which is treated as if it were circular.
73
Baud rates should be specified in descending order, so that the
74
null character (Ctrl-@) can also be used for baud rate switching.
77
The value to be used for the TERM environment variable. This overrides
78
whatever init(8) may have set, and is inherited by login and the shell.
86
Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more
90
Assume that the tty is 8-bit clean, hence disable parity detection.
93
Enable hardware (RTS/CTS) flow control. It is left up to the
94
application to disable software (XON/XOFF) flow protocol where
98
Do not display the contents of \fI/etc/issue\fP (or other) before writing the
99
login prompt. Terminals or communications hardware may become confused
100
when receiving lots of text at the wrong baud rate; dial-up scripts
101
may fail if the login prompt is preceded by too much text.
104
Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
105
This allows custom messages to be displayed on different terminals.
106
The \-i option will override this option.
109
Set an initial string to be sent to the tty or modem before sending
110
anything else. This may be used to initialize a modem. Non printable
111
characters may be sent by writing their octal code preceded by a
112
backslash (\\). For example to send a linefeed character (ASCII 10,
113
octal 012) write \\012.
116
\-l \fIlogin_program\fP
117
Invoke the specified \fIlogin_program\fP instead of /bin/login.
118
This allows the use of a non-standard login program (for example,
119
one that asks for a dial-up password or that uses a different
123
Write the specified \fIlogin_host\fP into the utmp file. (Normally,
124
no login host is given, since \fBagetty\fP is used for local hardwired
125
connections and consoles. However, this option can be useful for
126
identifying terminal concentrators and the like.
129
Try to extract the baud rate the CONNECT status message
130
produced by Hayes(tm)\-compatible modems. These status
131
messages are of the form: "<junk><speed><junk>".
132
\fBagetty\fP assumes that the modem emits its status message at
133
the same speed as specified with (the first) \fIbaud_rate\fP value
136
Since the \fI\-m\fP feature may fail on heavily-loaded systems,
137
you still should enable BREAK processing by enumerating all
138
expected baud rates on the command line.
141
Do not prompt the user for a login name. This can be used in
142
connection with \-l option to invoke a non-standard login process such
143
as a BBS system. Note that with the \-n option, \fBagetty\fR gets no input from
144
user who logs in and therefore won't be able to figure out parity,
145
character size, and newline processing of the connection. It defaults to
146
space parity, 7 bit characters, and ASCII CR (13) end-of-line character.
147
Beware that the program that \fBagetty\fR starts (usually /bin/login)
151
Terminate if no user name could be read within \fItimeout\fP
152
seconds. This option should probably not be used with hard-wired
156
Force the line to be a local line with no need for carrier detect. This can
157
be useful when you have a locally attached terminal where the serial line
158
does not set the carrier detect signal.
161
Try to keep the existing baud rate. The baud rates from
162
the command line are used when agetty receives a BREAK character.
165
Turn on support for detecting an uppercase only terminal. This setting will
166
detect a login name containing only capitals as indicating an uppercase
167
only terminal and turn on some upper to lower case conversions. Note that
168
this has no support for any unicode characters.
171
Wait for the user or the modem to send a carriage-return or a
172
linefeed character before sending the \fI/etc/issue\fP (or other) file
173
and the login prompt. Very useful in connection with the \-I option.
176
This section shows examples for the process field of an entry in the
177
\fI/etc/inittab\fP file. You'll have to prepend appropriate values
178
for the other fields. See \fIinittab(5)\fP for more details.
180
For a hard-wired line or a console tty:
182
/sbin/agetty 9600 ttyS1
184
For a directly connected terminal without proper carriage detect wiring:
185
(try this if your terminal just sleeps instead of giving you a password:
188
/sbin/agetty \-L 9600 ttyS1 vt100
190
For a old style dial-in line with a 9600/2400/1200 baud modem:
192
/sbin/agetty \-mt60 ttyS1 9600,2400,1200
194
For a Hayes modem with a fixed 115200 bps interface to the machine:
195
(the example init string turns off modem echo and result codes, makes
196
modem/computer DCD track modem/modem DCD, makes a DTR drop cause a
197
dis-connection and turn on auto-answer after 1 ring.)
199
/sbin/agetty \-w \-I 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1
202
The issue-file (\fI/etc/issue\fP or the file set with the \-f option)
203
may contain certain escape codes to display the system name, date and
204
time etc. All escape codes consist of a backslash (\\) immediately
205
followed by one of the letters explained below.
209
Insert the baudrate of the current line.
212
Insert the current date.
215
Insert the system name, the name of the operating system.
218
Insert the name of the current tty line.
221
Insert the architecture identifier of the machine, eg. i486
224
Insert the nodename of the machine, also known as the hostname.
227
Insert the NIS domainname of the machine.
230
Insert the DNS domainname of the machine.
233
Insert the release number of the OS, eg. 1.1.9.
236
Insert the current time.
239
Insert the number of current users logged in.
242
Insert the string "1 user" or "<n> users" where <n> is the number of current
246
Insert the version of the OS, eg. the build-date etc.
248
Example: On my system, the following \fI/etc/issue\fP file:
253
This is \\n.\\o (\\s \\m \\r) \\t
258
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
265
/var/run/utmp, the system status file.
266
/etc/issue, printed before the login prompt.
267
/dev/console, problem reports (if syslog(3) is not used).
268
/etc/inittab, \fIinit\fP(8) configuration file.
272
The baud-rate detection feature (the \fI-m\fP option) requires that
273
\fBagetty\fP be scheduled soon enough after completion of a dial-in
274
call (within 30 ms with modems that talk at 2400 baud). For robustness,
275
always use the \fI\-m\fP option in combination with a multiple baud
276
rate command-line argument, so that BREAK processing is enabled.
278
The text in the \fI/etc/issue\fP file (or other) and the login prompt
279
are always output with 7-bit characters and space parity.
281
The baud-rate detection feature (the \fI-m\fP option) requires that
282
the modem emits its status message \fIafter\fP raising the DCD line.
286
Depending on how the program was configured, all diagnostics are
287
written to the console device or reported via the syslog(3) facility.
288
Error messages are produced if the \fIport\fP argument does not
289
specify a terminal device; if there is no utmp entry for the
290
current process (System V only); and so on.
294
W.Z. Venema <wietse@wzv.win.tue.nl>
295
Eindhoven University of Technology
296
Department of Mathematics and Computer Science
297
Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
299
Peter Orbaek <poe@daimi.aau.dk>
300
Linux port and more options. Still maintains the code.
302
Eric Rasmussen <ear@usfirst.org>
303
Added \-f option to display custom login messages on different terminals.
306
The agetty command is part of the util-linux package and is available from
307
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.