xref: /dragonfly/libexec/getty/ttys.5 (revision 1de703da)
1.\" Copyright (c) 1985, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     from: @(#)ttys.5	8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: src/libexec/getty/ttys.5,v 1.11.2.3 2001/08/16 10:44:15 ru Exp $
34.\" $DragonFly: src/libexec/getty/ttys.5,v 1.2 2003/06/17 04:27:07 dillon Exp $
35.\" "
36.Dd November 17, 1996
37.Dt TTYS 5
38.Os
39.Sh NAME
40.Nm ttys
41.Nd terminal initialization information
42.Sh DESCRIPTION
43The file
44.Nm
45contains information that is used by various routines to initialize
46and control the use of terminal special files.
47This information is read with the
48.Xr getttyent 3
49library routines.
50There is one line in the
51.Nm
52file per special device file.
53Fields are separated by tabs and/or spaces.
54Fields comprised of more than one word should be enclosed in double
55quotes (``"'').
56Blank lines and comments may appear anywhere in the file; comments
57are delimited by hash marks (``#'') and new lines.
58Any unspecified fields will default to null.
59.Pp
60The first field is normally the
61name of the terminal special file as it is found in
62.Pa /dev .
63However, it can be any arbitrary string
64when the associated command is not related to a tty.
65.Pp
66The second field of the file is the command to execute for the line,
67usually
68.Xr getty 8 ,
69which initializes and opens the line, setting the speed, waiting for
70a user name and executing the
71.Xr login 1
72program.
73It can be, however, any desired command, for example
74the start up for a window system terminal emulator or some other
75daemon process, and can contain multiple words if quoted.
76.Pp
77The third field is the type of terminal usually connected to that
78tty line, normally the one found in the
79.Xr termcap 5
80data base file.
81The environment variable
82.Ev TERM
83is initialized with the value by
84either
85.Xr getty 8
86or
87.Xr login 1 .
88.Pp
89The remaining fields set flags in the
90.Fa ty_status
91entry (see
92.Xr getttyent 3 ) ,
93specify a window system process that
94.Xr init 8
95will maintain for the terminal line, optionally determine the
96type of tty (whether dialin, network or otherwise),
97or specify a tty group
98name that allows the login class database (see
99.Xr login.conf 5 )
100to refer to many ttys as a group, to selectively allow or
101deny access or enable or disable accounting facilities for
102ttys as a group.
103.Pp
104As flag values, the strings ``on'' and ``off'' specify that
105.Xr init 8
106should (should not) execute the command given in the second field,
107while ``secure'' (if ``on'' is also specified) allows users with a
108uid of 0 to login on
109this line.
110The flag ``dialin'' indicates that a tty entry describes a dialin
111line, and ``network'' indicates that a tty entry provides a
112network connection.
113Either of these strings may also be specified in the terminal type
114field.
115The string ``window='' may be followed by a quoted command
116string which
117.Xr init 8
118will execute
119.Em before
120starting the command specified by the second field.
121.Pp
122The string ``group='' may be followed by a group name comprised of
123alphanumeric characters that can be used by
124.Xr login.conf 5
125to refer to many tty lines as a group to enable or disable access
126and accounting facilities.
127If no group is specified, then the tty becomes a member of the group
128"none".
129For backwards compatibility, the ``group='' should appear last on the
130line, immediately before the optional comment.
131.Pp
132Both the second field and any command specified with ``window=''
133will be split into words and executed using
134.Xr execve 2 .
135Words are separated by any combinations of tabs and spaces.
136Arguments containing whitespace should be enclosed in single quotes
137.Pq Li ' .
138Note that no shell-style globbing or other variable substitution occurs.
139.Sh EXAMPLES
140.Bd -literal
141# root login on console at 1200 baud
142console	"/usr/libexec/getty std.1200"	vt100	on secure
143# dialup at 1200 baud, no root logins
144ttyd0	"/usr/libexec/getty d1200"	dialup	on group=dialup	# 555-1234
145# Mike's terminal: hp2621
146ttyh0	"/usr/libexec/getty std.9600"	hp2621-nl	on group=dialup	# 457 Evans
147# John's terminal: vt100
148ttyh1	"/usr/libexec/getty std.9600"	vt100	on group=dialup		# 459 Evans
149# terminal emulate/window system
150ttyv0	"/usr/new/xterm -L :0"		vs100	on window="/usr/new/Xvs100 0"
151# Network pseudo ttys -- don't enable getty
152ttyp0	none	network 	group=pty
153ttyp1	none	network	off	group=pty
154.Ed
155.Sh FILES
156.Bl -tag -width /etc/ttys -compact
157.It Pa /etc/ttys
158.El
159.Sh SEE ALSO
160.Xr login 1 ,
161.Xr getttyent 3 ,
162.Xr ttyslot 3 ,
163.Xr gettytab 5 ,
164.Xr login.conf 5 ,
165.Xr termcap 5 ,
166.Xr getty 8 ,
167.Xr init 8
168.\".Xr init 8 ,
169.\".Xr ttyflags 8
170.Sh HISTORY
171A
172.Nm
173file appeared in
174.At v6 .
175