File: rungetty.8

package info (click to toggle)
rungetty 1.2-17
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: ansic: 3,931; makefile: 33
file content (221 lines) | stat: -rw-r--r-- 5,264 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
.TH RUNGETTY 8 "04 February 1999" " Jakob 'sparky' Kaivo " "Linux Programmer's Manual"
.SH NAME
rungetty \- a minimal console getty that can run any process
.SH SYNOPSIS
.B rungetty
[\-\-noclear] [\-\-long\-hostname] [\-u 
.IR username ]
[\-g
.IR group ]
[\-w 
.IR path ] 
[\-n
.IR priority ] 
[\-\-prompt [=string]] [\-d
.IR n ]
[\-\-autologin
.IR username ]
.I tty
[\-\-] [command] [arguments]
.PP
.SH DESCRIPTION
.B rungetty
is a getty for use on virtual consoles which has the ability to run any program,
not just 
.BR login (1).
Like
.BR mingetty (8),
on which
.B rungetty
is based,
.B rungetty
isn't suitable for serial use. Both I and the author of 
.BR mingetty (8)
recommend 
.BR mgetty (8)
for that. It is useful, though, for keeping programs such as, say,
.BR telnet (1),
running at all times. When running a program other than login, it is executed as the user and group
.BR nobody ,
or the user specified by
.I username
and group specified by
.IR group .
.PP
.SH OPTIONS
.TP
.B \-\-noclear
Do not clear the screen before prompting for the login name (the screen
is normally cleared).
.TP
.B \-\-long\-hostname
By default the hostname is only printed until the first dot.
With this option enabled, the full text from gethostname() is shown.
.TP
.B \-u username
By default, rungetty runs programs as nobody. With this option, it runs as
the user
.IR username .
.TP
.B \-g group
By default, rungetty runs as the group nobody. This option allows you to tell rungetty to run programs as the group
.IR group .
.TP
.B \-\-prompt [=string]
This option causes rungetty to wait until user input (usually an 'Enter')
before executing the program. If
.I string
is specified, it will be displayed. Otherwise, a default prompt will be shown.
.TP
.B \-n n
\'nice\' value of specified program.
.TP
.B \-w path
Working directory of specified program.
.TP
.B \-d n
Specifying \-d will make rungetty wait
.I n
seconds before running the specified program.
.TP
.B \-\-autologin username
Log the specified user onto the console (normally
.IR  /dev/tty1 )
when the system is first booted without prompting for a username or
password.
.IP
When the autologin option is supplied,
.B rungetty 
will check that the controlling terminal is the console (normally
.IR /dev/tty1 ), 
that a reasonable username has been supplied, and that this is the
first autologin request since the system has booted.  If all of these
conditions have been met, a request for an unauthenticated login is
passed to the
.B login 
program.  Otherwise, a normal interactive login is performed.
.IP
The
.B login 
program may deny the request for an unauthenticated login.  Typically
this will happen when the user is root, has a UID of 0, or whenever a
normal interactive login would be denied due to the access
restrictions specified in the
.IR nologin , 
.IR usertty , 
or
.I securetty 
files.
.IP
Only a single autologin request will be issued after a system boot.
If the automated login request is denied, or if the user logs out, 
.B rungetty
will revert to performing normal interactive logins for all subsequent
login requests.
.TP
.B \-\-
Tells
.B rungetty
that there are no more options to parse, useful for passing arguments with
a - in them to the external program.

.PP
.SH ARGUMENTS
.TP
.I tty
Name of the tty to run on.
.TP
.I command 
Runs specified
.IR command .
Searches for command in 
.BR /bin ,
.BR /usr/bin ,
.BR /usr/ucb ,
.BR /usr/local/bin
if the complete pathname and filename are not given.
.TP 
.I [arguments]
Command line arguments to pass to
.IR command .
.PP
.SH "ISSUE ESCAPES"
.B rungetty 
recognizes the following escape sequences which might be embedded in the 
.I /etc/issue
file:
.IP \fB\ed\fP
insert current day (localtime),
.IP \fB\el\fP
insert line on which 
.B rungetty 
is running,
.IP \fB\em\fP
inserts machine architecture (uname \-m),
.IP \fB\en\fP
inserts machine's network node hostname (uname \-n),
.IP \fB\eo\fP
inserts domain name,
.IP \fB\er\fP
inserts operating system release (uname \-r),
.IP \fB\et\fP
insert current time (localtime),
.IP \fB\es\fP
inserts operating system name,
.IP \fB\eu\fP\ resp.\ \fB\eU\fP
the current number of users which are currently logged in.
\\U inserts "\fIn\fP users", where as \\u only inserts "\fIn\fP".
.IP \fB\ev\fP
inserts operating system version (uname \-v).
.PP
.SH EXAMPLE
In
.BR /etc/inittab ,
these lines:
.br
.br
.B r1:12345:respawn:/sbin/rungetty tty1
.br
.B r2:2345:respawn:/sbin/rungetty tty2 telnet mail.foo.com
.br
.B r3:2345:respawn:/sbin/rungetty tty3 \-u support top
.br
.B r4:2345:respawn:/sbin/rungetty tty4 \-n 20 \-w /etc rc5des
.br
Would run a local login on 
.BR /dev/tty1 , a 
.BR telnet (1)
session to mail.foo.com on
.BR /dev/tty2 , and 
.BR top (5) on 
.BR /dev/tty3 .
Note that
.BR telnet (1)
is run as user
.BR nobody ,
while
.BR top (5)
is run as user
.BR support ,
and start the program
.BR rc5des (5)
at the lowest priority level with a current directory of 
.BR /etc .
.PP
.SH FILES
.IR /etc/issue ,
.IR /var/run/utmp ,
.IR /var/log/autologin .
.PP
.SH BUG REPORTS
Please send all bug reports to
.BR jake@nodomainname.net .
.SH BUGS
There are no known bugs.
.PP
.SH "SEE ALSO"
.BR mingetty (8),
.BR mgetty (8).
.PP
.SH AUTHOR
Copyright \(co 1999 Jakob Kaivo <jake@nodomainname.net>.