| 1 |
.\" |
| 2 |
.TH MINGETTY 8 "29 May 2007" "SuSE" "Linux Programmer's Manual" |
| 3 |
.SH NAME |
| 4 |
mingetty \- minimal getty for consoles |
| 5 |
.SH SYNOPSIS |
| 6 |
.B /sbin/mingetty |
| 7 |
.RB [ \-\-noclear ] |
| 8 |
.RB [ \-\-nonewline ] |
| 9 |
.RB [ \-\-noissue ] |
| 10 |
.RB [ \-\-nohangup ] |
| 11 |
.RB [ \-\-noreset ] |
| 12 |
.RB [ \-\-no\-hostname ] |
| 13 |
.RB [ \-\-long-hostname ] |
| 14 |
.RB [ \-\-login\ \fIlogin_binary\fP ] |
| 15 |
.RB [ \-\-logopts\ \fI"login_options"\fP ] |
| 16 |
.RB [ \-\-nice\ \fInumber\fP ] |
| 17 |
.RB [ \-\-delay\ \fInumber\fP ] |
| 18 |
.RB [ \-\-chdir\ \fI/home\fP ] |
| 19 |
.RB [ \-\-chroot\ \fI/chroot\fP ] |
| 20 |
.RB [ \-\-autologin\ \fIuser\fP ] |
| 21 |
.RB [ \-\-loginpause ] |
| 22 |
.RB [ \-\-old ] |
| 23 |
.I tty |
| 24 |
.RI [ term ] |
| 25 |
.PP |
| 26 |
.SH DESCRIPTION |
| 27 |
.B mingetty |
| 28 |
is a minimal getty for use on virtual consoles. |
| 29 |
Unlike |
| 30 |
.BR agetty (8), |
| 31 |
.B mingetty |
| 32 |
is not suitable for serial lines. |
| 33 |
For this purpose the usage of |
| 34 |
.BR mgetty (8) |
| 35 |
is recommend. |
| 36 |
.PP |
| 37 |
.SH OPTIONS |
| 38 |
.TP |
| 39 |
.B \-\-noclear |
| 40 |
Do not clear the screen before prompting for the login name (the screen |
| 41 |
is normally cleared). |
| 42 |
.TP |
| 43 |
.B \-\-noreset |
| 44 |
By default the terminal settings will be initialized to some |
| 45 |
sane default values. With this option the terminal settings |
| 46 |
will not be changed. |
| 47 |
.TP |
| 48 |
.B \-\-nonewline |
| 49 |
Do not print a newline before writing out /etc/issue. |
| 50 |
.TP |
| 51 |
.B \-\-noissue |
| 52 |
Do not output /etc/issue. |
| 53 |
.TP |
| 54 |
.B \-\-nohangup |
| 55 |
Do not call vhangup() to disable writing to this tty by |
| 56 |
other applications. |
| 57 |
.TP |
| 58 |
.B \-\-no\-hostname |
| 59 |
By default the hostname will be printed. |
| 60 |
With this option enabled, no hostname at all will be shown. |
| 61 |
.TP |
| 62 |
.B \-\-long\-hostname |
| 63 |
By default the hostname is only printed until the first dot. |
| 64 |
With this option enabled, the full text from gethostname() is shown. |
| 65 |
.TP |
| 66 |
.B \-\-login \fIlogin_binary\fP |
| 67 |
Use the \fIlogin_binary\fP to log in instead of the default |
| 68 |
.IR /bin/login . |
| 69 |
.TP |
| 70 |
.B \-\-logopts \fI"login_options"\fP |
| 71 |
Options that are passed to the login program. |
| 72 |
\\\\u |
| 73 |
is replaced by the login |
| 74 |
name. Defaults to "\-\- \\\\u", which is suitable for |
| 75 |
.IR /bin/login . |
| 76 |
Please read the SECURITY NOTICE below if you want to use this. |
| 77 |
.TP |
| 78 |
.B \-\-nice 10 |
| 79 |
Change the priority by calling nice(). |
| 80 |
.TP |
| 81 |
.B \-\-delay 5 |
| 82 |
Sleep this many seconds after startup of mingetty. |
| 83 |
.TP |
| 84 |
.B \-\-chdir /home |
| 85 |
Change into this directory before calling the login prog. |
| 86 |
.TP |
| 87 |
.B \-\-chroot /chroot |
| 88 |
Call chroot() with this directory name. |
| 89 |
.TP |
| 90 |
.B \-\-autologin username |
| 91 |
Log the specified user automatically in without asking for |
| 92 |
a login name and password. Check the \-f option from |
| 93 |
.B /bin/login |
| 94 |
for this. |
| 95 |
.TP |
| 96 |
.B \-\-loginpause |
| 97 |
Wait for any key before dropping to the login prompt. |
| 98 |
Can be combined with \fB\-\-autologin\fR to save memory by lazily spawning |
| 99 |
shells. |
| 100 |
.TP |
| 101 |
.B \-\-old |
| 102 |
Do not reset the terminal line to standard settings and |
| 103 |
do not hangup the |
| 104 |
.I /dev/vcs |
| 105 |
and |
| 106 |
.I /dev/vcsa |
| 107 |
virtual console memory devices which may remain from a former session. |
| 108 |
This hangup requires access to the |
| 109 |
.I /proc |
| 110 |
file system because the linux kernel does not have a |
| 111 |
.B revoke() |
| 112 |
system call. |
| 113 |
Please read the SECURITY NOTICE below if you want to use this. |
| 114 |
.PP |
| 115 |
.SH SECURITY NOTICE |
| 116 |
If you use the |
| 117 |
.B \-\-login |
| 118 |
and |
| 119 |
.B \-\-logopts |
| 120 |
options, be aware that a malicious user |
| 121 |
may try to enter lognames with embedded options, which then get passed to |
| 122 |
the used login program. |
| 123 |
.B mingetty |
| 124 |
does check for a leading |
| 125 |
\- |
| 126 |
and makes sure the logname gets passed as one |
| 127 |
parameter (so embedded spaces will not create yet another parameter), but |
| 128 |
depending on how the login binary parses the command line that might not be |
| 129 |
sufficient. Check that the used login program can not be abused this way. |
| 130 |
.PP |
| 131 |
Some programs use |
| 132 |
\-\- |
| 133 |
to indicate that the rest of the commandline should not be interpreted as |
| 134 |
options. Use this feature if available by passing |
| 135 |
\-\- |
| 136 |
before the username gets passed by |
| 137 |
\\\\u. |
| 138 |
.PP |
| 139 |
If you use the |
| 140 |
.B \-\-old |
| 141 |
be aware that remaining opened or memory mapped |
| 142 |
.IB /dev/vcs <#> |
| 143 |
or |
| 144 |
.IB /dev/vcsa <#> |
| 145 |
virtual console memory devices provide all infomation of the |
| 146 |
corresponding terminal line |
| 147 |
.I /dev/tty<#> |
| 148 |
to a possible attacker. |
| 149 |
.SH "ISSUE ESCAPES" |
| 150 |
.B mingetty |
| 151 |
recognizes the following escapes sequences which might be embedded in the |
| 152 |
.I /etc/issue |
| 153 |
file: |
| 154 |
.IP \fB\ed\fP |
| 155 |
insert current day (localtime), |
| 156 |
.IP \fB\el\fP |
| 157 |
insert line on which |
| 158 |
.B mingetty |
| 159 |
is running, |
| 160 |
.IP \fB\em\fP |
| 161 |
inserts machine architecture (uname \-m), |
| 162 |
.IP \fB\en\fP |
| 163 |
inserts machine's network node hostname (uname \-n), |
| 164 |
.IP \fB\eo\fP |
| 165 |
inserts domain name, |
| 166 |
.IP \fB\er\fP |
| 167 |
inserts operating system release (uname \-r), |
| 168 |
.IP \fB\et\fP |
| 169 |
insert current time (localtime), |
| 170 |
.IP \fB\es\fP |
| 171 |
inserts operating system name, |
| 172 |
.IP \fB\eu\fP |
| 173 |
resp. \fB\eU\fP |
| 174 |
the current number of users which are currently logged in. |
| 175 |
\\U inserts "\fIn\fP users", where as \\u only inserts "\fIn\fP". |
| 176 |
.IP \fB\ev\fP |
| 177 |
inserts operating system version (uname -v). |
| 178 |
.PP |
| 179 |
.SH EXAMPLE |
| 180 |
"\fBLinux\ eos\ i386\ #1\ Tue\ Mar\ 19\ 21:54:09\ MET\ 1996\fP" was produced |
| 181 |
by putting "\fB\\s\ \\n\ \\m\ \\v\fP" into |
| 182 |
.IR /etc/issue . |
| 183 |
.PP |
| 184 |
.SH FILES |
| 185 |
.IR /etc/issue , |
| 186 |
.br |
| 187 |
.IR /var/run/utmp , |
| 188 |
.br |
| 189 |
.IR /etc/inittab . |
| 190 |
.br |
| 191 |
.PP |
| 192 |
.SH "SEE ALSO" |
| 193 |
.BR mgetty (8), |
| 194 |
.br |
| 195 |
.BR agetty (8), |
| 196 |
.br |
| 197 |
.BR inittab (5), |
| 198 |
.br |
| 199 |
.BR vcs (8). |
| 200 |
.PP |
| 201 |
.SH AUTHOR |
| 202 |
Copyright \(co 1996 Florian La Roche <[email protected]> |
| 203 |
or <[email protected]\-sb.de>. |
| 204 |
.br |
| 205 |
Copyright \(co 1999-2002 Werner Fink <[email protected]>. |
| 206 |
Man-page written by David Frey <[email protected]>, |
| 207 |
Florian La Roche, and updated by Werner Fink. |