1AGETTY(8)                   System Manager's Manual                  AGETTY(8)
2
3
4

NAME

6       agetty - alternative Linux getty
7
8

SYNOPSIS

10       agetty [-ihLmnw] [-f issue_file] [-l login_program] [-I init] [-t time‐
11       out] [-H login_host] port baud_rate,...  [term]
12       agetty [-ihLmnw] [-f issue_file] [-l login_program] [-I init] [-t time‐
13       out] [-H login_host] baud_rate,...  port [term]
14
15

DESCRIPTION

17       agetty  opens  a  tty  port,  prompts  for a login name and invokes the
18       /bin/login command. It is normally invoked by init(8).
19
20       agetty has several non-standard features that are useful for hard-wired
21       and for dial-in lines:
22
23       o      Adapts  the tty settings to parity bits and to erase, kill, end-
24              of-line and uppercase characters when it  reads  a  login  name.
25              The  program can handle 7-bit characters with even, odd, none or
26              space parity, and 8-bit characters with no parity. The following
27              special  characters  are  recognized: @ and Control-U (kill); #,
28              DEL and back space (erase); carriage return and line  feed  (end
29              of line).
30
31       o      Optionally  deduces the baud rate from the CONNECT messages pro‐
32              duced by Hayes(tm)-compatible modems.
33
34       o      Optionally does not hang up when it is given an  already  opened
35              line (useful for call-back applications).
36
37       o      Optionally does not display the contents of the /etc/issue file.
38
39       o      Optionally   displays  an  alternative  issue  file  instead  of
40              /etc/issue.
41
42       o      Optionally does not ask for a login name.
43
44       o      Optionally invokes  a  non-standard  login  program  instead  of
45              /bin/login.
46
47       o      Optionally turns on hard-ware flow control
48
49       o      Optionally  forces the line to be local with no need for carrier
50              detect.
51
52       This program does not use the /etc/gettydefs (System  V)  or  /etc/get‐
53       tytab (SunOS 4) files.
54

ARGUMENTS

56       port   A  path  name relative to the /dev directory. If a "-" is speci‐
57              fied, agetty assumes that its standard  input  is  already  con‐
58              nected  to a tty port and that a connection to a remote user has
59              already been established.
60
61              Under System V, a "-" port argument  should  be  preceded  by  a
62              "--".
63
64       baud_rate,...
65              A  comma-separated  list  of  one  or more baud rates. Each time
66              agetty receives a BREAK character it advances through the  list,
67              which is treated as if it were circular.
68
69              Baud  rates should be specified in descending order, so that the
70              null character (Ctrl-@) can also be used for baud  rate  switch‐
71              ing.
72
73       term   The  value  to  be  used for the TERM environment variable. This
74              overrides whatever init(8) may have set,  and  is  inherited  by
75              login and the shell.
76

OPTIONS

78       -h     Enable  hardware  (RTS/CTS)  flow  control. It is left up to the
79              application to disable software (XON/XOFF) flow  protocol  where
80              appropriate.
81
82       -i     Do  not  display  the  contents  of /etc/issue (or other) before
83              writing the login prompt. Terminals or  communications  hardware
84              may  become  confused  when  receiving lots of text at the wrong
85              baud rate; dial-up scripts may fail if the login prompt is  pre‐
86              ceded by too much text.
87
88       -f issue_file
89              Display  the contents of issue_file instead of /etc/issue.  This
90              allows custom messages to be displayed on  different  terminals.
91              The -i option will override this option.
92
93       -I initstring
94              Set  an  initial  string  to  be sent to the tty or modem before
95              sending anything else. This may be used to initialize  a  modem.
96              Non printable characters may be sent by writing their octal code
97              preceded by a backslash (\). For  example  to  send  a  linefeed
98              character (ASCII 10, octal 012) write \012.
99
100       -l login_program
101              Invoke  the specified login_program instead of /bin/login.  This
102              allows the use of a non-standard login program (for example, one
103              that  asks for a dial-up password or that uses a different pass‐
104              word file).
105
106       -H login_host
107              Write the specified login_host into the utmp file. (Normally, no
108              login  host  is  given, since agetty is used for local hardwired
109              connections and consoles. However, this option can be useful for
110              identifying terminal concentrators and the like.
111
112       -m     Try to extract the baud rate the CONNECT status message produced
113              by Hayes(tm)-compatible modems. These status messages are of the
114              form:  "<junk><speed><junk>".   agetty  assumes  that  the modem
115              emits its status message at the same  speed  as  specified  with
116              (the first) baud_rate value on the command line.
117
118              Since  the  -m  feature  may fail on heavily-loaded systems, you
119              still should enable BREAK processing by enumerating all expected
120              baud rates on the command line.
121
122       -n     Do  not  prompt  the  user for a login name. This can be used in
123              connection with -l option to invoke a non-standard login process
124              such  as a BBS system. Note that with the -n option, agetty gets
125              no input from user who logs in and therefore won't  be  able  to
126              figure out parity, character size, and newline processing of the
127              connection. It defaults to space parity, 7 bit  characters,  and
128              ASCII  CR  (13)  end-of-line character.  Beware that the program
129              that agetty starts (usually /bin/login) is run as root.
130
131       -t timeout
132              Terminate if no user name could be read within timeout  seconds.
133              This option should probably not be used with hard-wired lines.
134
135       -L     Force  the  line  to  be  a  local line with no need for carrier
136              detect. This can be useful when you have a locally attached ter‐
137              minal where the serial line does not set the carrier detect sig‐
138              nal.
139
140       -w     Wait for the user or the modem to send a  carriage-return  or  a
141              linefeed character before sending the /etc/issue (or other) file
142              and the login prompt. Very useful  in  connection  with  the  -I
143              option.
144

EXAMPLES

146       This  section  shows  examples for the process field of an entry in the
147       /etc/inittab file.  You'll have to prepend appropriate values  for  the
148       other fields.  See inittab(5) for more details.
149
150       For a hard-wired line or a console tty:
151            /sbin/agetty 9600 ttyS1
152
153       For  a  directly  connected  terminal  without  proper  carriage detect
154       wiring: (try this if your terminal just sleeps instead of giving you  a
155       password: prompt.)
156            /sbin/agetty -L 9600 ttyS1 vt100
157
158       For a old style dial-in line with a 9600/2400/1200 baud modem:
159            /sbin/agetty -mt60 ttyS1 9600,2400,1200
160
161       For  a  Hayes  modem  with a fixed 115200 bps interface to the machine:
162       (the example init string turns off modem echo and result  codes,  makes
163       modem/computer DCD track modem/modem DCD, makes a DTR drop cause a dis-
164       connection and turn on auto-answer after 1 ring.)
165            /sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1
166
167

ISSUE ESCAPES

169       The issue-file (/etc/issue or the file set with the -f option) may con‐
170       tain  certain  escape  codes  to display the system name, date and time
171       etc. All escape codes consist of a backslash (\)  immediately  followed
172       by one of the letters explained below.
173
174
175       b      Insert the baudrate of the current line.
176
177       d      Insert the current date.
178
179       s      Insert the system name, the name of the operating system.
180
181       l      Insert the name of the current tty line.
182
183       m      Insert the architecture identifier of the machine, eg. i486
184
185       n      Insert the nodename of the machine, also known as the hostname.
186
187       o      Insert the domainname of the machine.
188
189       r      Insert the release number of the OS, eg. 1.1.9.
190
191       t      Insert the current time.
192
193       u      Insert the number of current users logged in.
194
195       U      Insert  the string "1 user" or "<n> users" where <n> is the num‐
196              ber of current users logged in.
197
198       v      Insert the version of the OS, eg. the build-date etc.
199
200       Example: On my system, the following /etc/issue file:
201
202              This is \n.\o (\s \m \r) \t
203
204       displays as
205
206              This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
207
208
209

FILES

211       /var/run/utmp, the system status file.
212       /etc/issue, printed before the login prompt.
213       /dev/console, problem reports (if syslog(3) is not used).
214       /etc/inittab, init(8) configuration file.
215

BUGS

217       The baud-rate detection feature (the -m option) requires that agetty be
218       scheduled  soon enough after completion of a dial-in call (within 30 ms
219       with modems that talk at 2400 baud). For robustness, always use the  -m
220       option  in combination with a multiple baud rate command-line argument,
221       so that BREAK processing is enabled.
222
223       The text in the /etc/issue file (or other) and  the  login  prompt  are
224       always output with 7-bit characters and space parity.
225
226       The baud-rate detection feature (the -m option) requires that the modem
227       emits its status message after raising the DCD line.
228

DIAGNOSTICS

230       Depending on how the program was configured, all diagnostics are  writ‐
231       ten  to  the  console  device  or  reported via the syslog(3) facility.
232       Error messages are produced if the port argument  does  not  specify  a
233       terminal  device;  if  there  is  no utmp entry for the current process
234       (System V only); and so on.
235

AUTHOR(S)

237       W.Z. Venema <wietse@wzv.win.tue.nl>
238       Eindhoven University of Technology
239       Department of Mathematics and Computer Science
240       Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
241
242       Peter Orbaek <poe@daimi.aau.dk>
243       Linux port and more options. Still maintains the code.
244
245       Eric Rasmussen <ear@usfirst.org>
246       Added -f option to display custom login messages on different terminals.
247
248

CREATION DATE

250       Sat Nov 25 22:51:05 MET 1989
251

LAST MODIFICATION

253       96/07/20
254
255
256
257                                                                     AGETTY(8)
Impressum