xref: /freebsd/libexec/getty/ttys.5 (revision 9a0e6be26a9360444c80278dc45b092637ac052b)
1cae66988SJoerg Wunsch.\" Copyright (c) 1985, 1991, 1993
2cae66988SJoerg Wunsch.\"	The Regents of the University of California.  All rights reserved.
3ea022d16SRodney W. Grimes.\"
4ea022d16SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
5ea022d16SRodney W. Grimes.\" modification, are permitted provided that the following conditions
6ea022d16SRodney W. Grimes.\" are met:
7ea022d16SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
8ea022d16SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
9ea022d16SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
10ea022d16SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
11ea022d16SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12ea022d16SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
13ea022d16SRodney W. Grimes.\"    must display the following acknowledgement:
14ea022d16SRodney W. Grimes.\"	This product includes software developed by the University of
15ea022d16SRodney W. Grimes.\"	California, Berkeley and its contributors.
16ea022d16SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
17ea022d16SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
18ea022d16SRodney W. Grimes.\"    without specific prior written permission.
19ea022d16SRodney W. Grimes.\"
20ea022d16SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21ea022d16SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22ea022d16SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23ea022d16SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24ea022d16SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25ea022d16SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26ea022d16SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27ea022d16SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28ea022d16SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29ea022d16SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30ea022d16SRodney W. Grimes.\" SUCH DAMAGE.
31ea022d16SRodney W. Grimes.\"
32cae66988SJoerg Wunsch.\"     from: @(#)ttys.5	8.1 (Berkeley) 6/4/93
337f3dea24SPeter Wemm.\" $FreeBSD$
34cae66988SJoerg Wunsch.\" "
35bfeb5e37SRuslan Ermilov.Dd May 27, 2005
36ea022d16SRodney W. Grimes.Dt TTYS 5
37ea022d16SRodney W. Grimes.Os
38ea022d16SRodney W. Grimes.Sh NAME
39ea022d16SRodney W. Grimes.Nm ttys
40ea022d16SRodney W. Grimes.Nd terminal initialization information
41ea022d16SRodney W. Grimes.Sh DESCRIPTION
42ea022d16SRodney W. GrimesThe file
43d748864dSPhilippe Charnier.Nm
44ea022d16SRodney W. Grimescontains information that is used by various routines to initialize
45ea022d16SRodney W. Grimesand control the use of terminal special files.
46ea022d16SRodney W. GrimesThis information is read with the
47ea022d16SRodney W. Grimes.Xr getttyent 3
48ea022d16SRodney W. Grimeslibrary routines.
49ea022d16SRodney W. GrimesThere is one line in the
50d748864dSPhilippe Charnier.Nm
51ea022d16SRodney W. Grimesfile per special device file.
52ea022d16SRodney W. GrimesFields are separated by tabs and/or spaces.
53ea022d16SRodney W. GrimesFields comprised of more than one word should be enclosed in double
54ea022d16SRodney W. Grimesquotes (``"'').
55ea022d16SRodney W. GrimesBlank lines and comments may appear anywhere in the file; comments
56ea022d16SRodney W. Grimesare delimited by hash marks (``#'') and new lines.
57ea022d16SRodney W. GrimesAny unspecified fields will default to null.
58ea022d16SRodney W. Grimes.Pp
59f0f4f756SSheldon HearnThe first field is normally the
60ea022d16SRodney W. Grimesname of the terminal special file as it is found in
61ea022d16SRodney W. Grimes.Pa /dev .
62f0f4f756SSheldon HearnHowever, it can be any arbitrary string
63f0f4f756SSheldon Hearnwhen the associated command is not related to a tty.
64ea022d16SRodney W. Grimes.Pp
65ea022d16SRodney W. GrimesThe second field of the file is the command to execute for the line,
66ea022d16SRodney W. Grimesusually
67ea022d16SRodney W. Grimes.Xr getty 8 ,
68ea022d16SRodney W. Grimeswhich initializes and opens the line, setting the speed, waiting for
69ea022d16SRodney W. Grimesa user name and executing the
70ea022d16SRodney W. Grimes.Xr login 1
71ea022d16SRodney W. Grimesprogram.
72ea022d16SRodney W. GrimesIt can be, however, any desired command, for example
73ea022d16SRodney W. Grimesthe start up for a window system terminal emulator or some other
74ea022d16SRodney W. Grimesdaemon process, and can contain multiple words if quoted.
75ea022d16SRodney W. Grimes.Pp
76ea022d16SRodney W. GrimesThe third field is the type of terminal usually connected to that
77ea022d16SRodney W. Grimestty line, normally the one found in the
78ea022d16SRodney W. Grimes.Xr termcap 5
79ea022d16SRodney W. Grimesdata base file.
80ea022d16SRodney W. GrimesThe environment variable
81d748864dSPhilippe Charnier.Ev TERM
82ea022d16SRodney W. Grimesis initialized with the value by
83ea022d16SRodney W. Grimeseither
84ea022d16SRodney W. Grimes.Xr getty 8
85ea022d16SRodney W. Grimesor
86ea022d16SRodney W. Grimes.Xr login 1 .
87ea022d16SRodney W. Grimes.Pp
88ea022d16SRodney W. GrimesThe remaining fields set flags in the
89ea022d16SRodney W. Grimes.Fa ty_status
90ea022d16SRodney W. Grimesentry (see
914ae89ecdSDavid Nugent.Xr getttyent 3 ) ,
924ae89ecdSDavid Nugentspecify a window system process that
93ea022d16SRodney W. Grimes.Xr init 8
94d95f252dSDavid Nugentwill maintain for the terminal line, optionally determine the
95d95f252dSDavid Nugenttype of tty (whether dialin, network or otherwise),
96d95f252dSDavid Nugentor specify a tty group
974ae89ecdSDavid Nugentname that allows the login class database (see
984ae89ecdSDavid Nugent.Xr login.conf 5 )
994ae89ecdSDavid Nugentto refer to many ttys as a group, to selectively allow or
1004ae89ecdSDavid Nugentdeny access or enable or disable accounting facilities for
1014ae89ecdSDavid Nugentttys as a group.
102ea022d16SRodney W. Grimes.Pp
103ea022d16SRodney W. GrimesAs flag values, the strings ``on'' and ``off'' specify that
104d748864dSPhilippe Charnier.Xr init 8
105ea022d16SRodney W. Grimesshould (should not) execute the command given in the second field,
106ea022d16SRodney W. Grimeswhile ``secure'' (if ``on'' is also specified) allows users with a
107ea022d16SRodney W. Grimesuid of 0 to login on
108ea022d16SRodney W. Grimesthis line.
109d95f252dSDavid NugentThe flag ``dialin'' indicates that a tty entry describes a dialin
110d95f252dSDavid Nugentline, and ``network'' indicates that a tty entry provides a
111d95f252dSDavid Nugentnetwork connection.
112d95f252dSDavid NugentEither of these strings may also be specified in the terminal type
113d95f252dSDavid Nugentfield.
114ea022d16SRodney W. GrimesThe string ``window='' may be followed by a quoted command
115ea022d16SRodney W. Grimesstring which
116d748864dSPhilippe Charnier.Xr init 8
117ea022d16SRodney W. Grimeswill execute
118ea022d16SRodney W. Grimes.Em before
119ea022d16SRodney W. Grimesstarting the command specified by the second field.
1204ae89ecdSDavid Nugent.Pp
1214ae89ecdSDavid NugentThe string ``group='' may be followed by a group name comprised of
1224ae89ecdSDavid Nugentalphanumeric characters that can be used by
1236bdca427SDavid Nugent.Xr login.conf 5
1244ae89ecdSDavid Nugentto refer to many tty lines as a group to enable or disable access
1254ae89ecdSDavid Nugentand accounting facilities.
1264ae89ecdSDavid NugentIf no group is specified, then the tty becomes a member of the group
1274ae89ecdSDavid Nugent"none".
1284ae89ecdSDavid NugentFor backwards compatibility, the ``group='' should appear last on the
1294ae89ecdSDavid Nugentline, immediately before the optional comment.
130f0f4f756SSheldon Hearn.Pp
131f0f4f756SSheldon HearnBoth the second field and any command specified with ``window=''
132f0f4f756SSheldon Hearnwill be split into words and executed using
133f0f4f756SSheldon Hearn.Xr execve 2 .
134f0f4f756SSheldon HearnWords are separated by any combinations of tabs and spaces.
135f0f4f756SSheldon HearnArguments containing whitespace should be enclosed in single quotes
136c4d9468eSRuslan Ermilov.Pq Li ' .
137f0f4f756SSheldon HearnNote that no shell-style globbing or other variable substitution occurs.
138a3ac07a5SRuslan Ermilov.Sh FILES
139a3ac07a5SRuslan Ermilov.Bl -tag -width /etc/ttys -compact
140a3ac07a5SRuslan Ermilov.It Pa /etc/ttys
141a3ac07a5SRuslan Ermilov.El
142ea022d16SRodney W. Grimes.Sh EXAMPLES
143ea022d16SRodney W. Grimes.Bd -literal
144ea022d16SRodney W. Grimes# root login on console at 1200 baud
145ea022d16SRodney W. Grimesconsole	"/usr/libexec/getty std.1200"	vt100	on secure
146ea022d16SRodney W. Grimes# dialup at 1200 baud, no root logins
1474ae89ecdSDavid Nugentttyd0	"/usr/libexec/getty d1200"	dialup	on group=dialup	# 555-1234
148ea022d16SRodney W. Grimes# Mike's terminal: hp2621
1494ae89ecdSDavid Nugentttyh0	"/usr/libexec/getty std.9600"	hp2621-nl	on group=dialup	# 457 Evans
150ea022d16SRodney W. Grimes# John's terminal: vt100
1514ae89ecdSDavid Nugentttyh1	"/usr/libexec/getty std.9600"	vt100	on group=dialup		# 459 Evans
152ea022d16SRodney W. Grimes# terminal emulate/window system
1539a0e6be2SXin LIttyv0	"/usr/local/bin/xterm -display :0"	xterm	on window="/usr/local/bin/X :0"
154ea022d16SRodney W. Grimes# Network pseudo ttys -- don't enable getty
1554ae89ecdSDavid Nugentttyp0	none	network 	group=pty
1564ae89ecdSDavid Nugentttyp1	none	network	off	group=pty
157ea022d16SRodney W. Grimes.Ed
158ea022d16SRodney W. Grimes.Sh SEE ALSO
159ea022d16SRodney W. Grimes.Xr login 1 ,
160ea022d16SRodney W. Grimes.Xr getttyent 3 ,
161ea022d16SRodney W. Grimes.Xr ttyslot 3 ,
162ea022d16SRodney W. Grimes.Xr gettytab 5 ,
1634ae89ecdSDavid Nugent.Xr login.conf 5 ,
164ea022d16SRodney W. Grimes.Xr termcap 5 ,
165ea022d16SRodney W. Grimes.Xr getty 8 ,
166ea022d16SRodney W. Grimes.Xr init 8
167cae66988SJoerg Wunsch.\".Xr init 8 ,
168cae66988SJoerg Wunsch.\".Xr ttyflags 8
169ea022d16SRodney W. Grimes.Sh HISTORY
170ea022d16SRodney W. GrimesA
171ea022d16SRodney W. Grimes.Nm
172ea022d16SRodney W. Grimesfile appeared in
173ea022d16SRodney W. Grimes.At v6 .
174