~ubuntu-branches/ubuntu/trusty/util-linux/trusty-proposed

« back to all changes in this revision

Viewing changes to login-utils/agetty.8

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2011-11-03 15:38:23 UTC
  • mto: (4.5.5 sid) (1.6.4)
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: package-import@ubuntu.com-20111103153823-10sx16jprzxlhkqf
ImportĀ upstreamĀ versionĀ 2.20.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH AGETTY 8 
2
 
.SH NAME
3
 
agetty \- alternative Linux getty
4
 
 
5
 
.SH SYNOPSIS
6
 
.BR "agetty " [\-c8ihLmnsUw]
7
 
.RI "[-f " issue_file ]
8
 
.RI "[-l " login_program ]
9
 
.RI "[-I " init ]
10
 
.RI "[-t " timeout ]
11
 
.RI "[-H " login_host ]
12
 
.I port
13
 
.I baud_rate,...
14
 
.RI [ term ]
15
 
 
16
 
.SH DESCRIPTION
17
 
.ad
18
 
.fi
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.
21
 
 
22
 
\fBagetty\fP has several \fInon-standard\fP features that are useful
23
 
for hard-wired and for dial-in lines:
24
 
.IP o
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).
31
 
.IP o
32
 
Optionally deduces the baud rate from the CONNECT messages produced by
33
 
Hayes(tm)-compatible modems.
34
 
.IP o
35
 
Optionally does not hang up when it is given an already opened line
36
 
(useful for call-back applications).
37
 
.IP o
38
 
Optionally does not display the contents of the \fI/etc/issue\fP file.
39
 
.IP o
40
 
Optionally displays an alternative issue file instead of \fI/etc/issue\fP.
41
 
.IP o
42
 
Optionally does not ask for a login name.
43
 
.IP o
44
 
Optionally invokes a non-standard login program instead of
45
 
\fI/bin/login\fP.
46
 
.IP o
47
 
Optionally turns on hard-ware flow control
48
 
.IP o
49
 
Optionally forces the line to be local with no need for carrier detect.
50
 
.PP
51
 
This program does not use the \fI/etc/gettydefs\fP (System V) or
52
 
\fI/etc/gettytab\fP (SunOS 4) files.
53
 
.SH ARGUMENTS
54
 
.na
55
 
.nf
56
 
.fi
57
 
.ad
58
 
.TP
59
 
port
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.
64
 
.sp
65
 
Under System V, a "-" \fIport\fP argument should be preceded
66
 
by a "--".
67
 
.TP
68
 
baud_rate,...
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.
72
 
.sp
73
 
Baud rates should be specified in descending order, so that the
74
 
null character (Ctrl-@) can also be used for baud rate switching.
75
 
.TP
76
 
term
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.
79
 
.SH OPTIONS
80
 
.na
81
 
.nf
82
 
.fi
83
 
.ad
84
 
.TP
85
 
\-c
86
 
Don't reset terminal cflags (control modes). See \fItermios(3)\fP for more
87
 
details.
88
 
.TP
89
 
\-8
90
 
Assume that the tty is 8-bit clean, hence disable parity detection.
91
 
.TP
92
 
\-h
93
 
Enable hardware (RTS/CTS) flow control. It is left up to the
94
 
application to disable software (XON/XOFF) flow protocol where
95
 
appropriate.
96
 
.TP
97
 
\-i
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.
102
 
.TP
103
 
\-f \fIissue_file\fP
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.
107
 
.TP
108
 
\-I \fIinitstring\fP
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.
114
 
.PP
115
 
.TP
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
120
 
password file).
121
 
.TP
122
 
\-H \fIlogin_host\fP
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.
127
 
.TP
128
 
\-m
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
134
 
on the command line.
135
 
.sp
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.
139
 
.TP 
140
 
\-n 
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)
148
 
is run as root.
149
 
.TP
150
 
\-t \fItimeout\fP
151
 
Terminate if no user name could be read within \fItimeout\fP
152
 
seconds. This option should probably not be used with hard-wired
153
 
lines.
154
 
.TP
155
 
\-L
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.
159
 
.TP
160
 
\-s
161
 
Try to keep the existing baud rate. The baud rates from
162
 
the command line are used when agetty receives a BREAK character.
163
 
.TP
164
 
\-U
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.
169
 
.TP
170
 
\-w 
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.
174
 
.PP
175
 
.SH EXAMPLES
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.
179
 
 
180
 
For a hard-wired line or a console tty:
181
 
.ti +5
182
 
/sbin/agetty 9600 ttyS1
183
 
 
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:
186
 
prompt.)
187
 
.ti +5
188
 
/sbin/agetty \-L 9600 ttyS1 vt100
189
 
 
190
 
For a old style dial-in line with a 9600/2400/1200 baud modem:
191
 
.ti +5
192
 
/sbin/agetty \-mt60 ttyS1 9600,2400,1200
193
 
 
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.)
198
 
.ti +5
199
 
/sbin/agetty \-w \-I 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1
200
 
 
201
 
.SH ISSUE ESCAPES
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.
206
 
 
207
 
.TP
208
 
b
209
 
Insert the baudrate of the current line.
210
 
.TP
211
 
d
212
 
Insert the current date.
213
 
.TP
214
 
s
215
 
Insert the system name, the name of the operating system.
216
 
.TP
217
 
l
218
 
Insert the name of the current tty line.
219
 
.TP
220
 
m
221
 
Insert the architecture identifier of the machine, eg. i486
222
 
.TP
223
 
n
224
 
Insert the nodename of the machine, also known as the hostname.
225
 
.TP
226
 
o
227
 
Insert the NIS domainname of the machine.
228
 
.TP
229
 
O
230
 
Insert the DNS domainname of the machine.
231
 
.TP
232
 
r
233
 
Insert the release number of the OS, eg. 1.1.9.
234
 
.TP
235
 
t
236
 
Insert the current time.
237
 
.TP
238
 
u
239
 
Insert the number of current users logged in.
240
 
.TP
241
 
U
242
 
Insert the string "1 user" or "<n> users" where <n> is the number of current
243
 
users logged in.
244
 
.TP
245
 
v
246
 
Insert the version of the OS, eg. the build-date etc.
247
 
.TP
248
 
Example: On my system, the following \fI/etc/issue\fP file:
249
 
 
250
 
.na
251
 
.nf
252
 
.ti +.5
253
 
This is \\n.\\o (\\s \\m \\r) \\t
254
 
.TP
255
 
displays as
256
 
 
257
 
.ti +.5
258
 
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
259
 
 
260
 
.fi
261
 
 
262
 
.SH FILES
263
 
.na
264
 
.nf
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.
269
 
.SH BUGS
270
 
.ad
271
 
.fi
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.
277
 
 
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.
280
 
 
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.
283
 
.SH DIAGNOSTICS
284
 
.ad
285
 
.fi
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.
291
 
.SH AUTHOR(S)
292
 
.na
293
 
.nf
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
298
 
 
299
 
Peter Orbaek <poe@daimi.aau.dk>
300
 
Linux port and more options. Still maintains the code.
301
 
 
302
 
Eric Rasmussen <ear@usfirst.org>
303
 
Added \-f option to display custom login messages on different terminals.
304
 
 
305
 
.SH AVAILABILITY
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/.