1*84d9c625SLionel Sambuc.\" $NetBSD: getty.8,v 1.18 2013/05/29 15:02:12 wiz Exp $ 2a06e2ab3SBen Gras.\" 3a06e2ab3SBen Gras.\" Copyright (c) 1980, 1991, 1993 4a06e2ab3SBen Gras.\" The Regents of the University of California. All rights reserved. 5a06e2ab3SBen Gras.\" 6a06e2ab3SBen Gras.\" Redistribution and use in source and binary forms, with or without 7a06e2ab3SBen Gras.\" modification, are permitted provided that the following conditions 8a06e2ab3SBen Gras.\" are met: 9a06e2ab3SBen Gras.\" 1. Redistributions of source code must retain the above copyright 10a06e2ab3SBen Gras.\" notice, this list of conditions and the following disclaimer. 11a06e2ab3SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 12a06e2ab3SBen Gras.\" notice, this list of conditions and the following disclaimer in the 13a06e2ab3SBen Gras.\" documentation and/or other materials provided with the distribution. 14a06e2ab3SBen Gras.\" 3. Neither the name of the University nor the names of its contributors 15a06e2ab3SBen Gras.\" may be used to endorse or promote products derived from this software 16a06e2ab3SBen Gras.\" without specific prior written permission. 17a06e2ab3SBen Gras.\" 18a06e2ab3SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19a06e2ab3SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20a06e2ab3SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21a06e2ab3SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22a06e2ab3SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23a06e2ab3SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24a06e2ab3SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25a06e2ab3SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26a06e2ab3SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27a06e2ab3SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28a06e2ab3SBen Gras.\" SUCH DAMAGE. 29a06e2ab3SBen Gras.\" 30a06e2ab3SBen Gras.\" from: @(#)getty.8 8.1 (Berkeley) 6/4/93 31a06e2ab3SBen Gras.\" 32*84d9c625SLionel Sambuc.Dd May 29, 2013 33a06e2ab3SBen Gras.Dt GETTY 8 34a06e2ab3SBen Gras.Os 35a06e2ab3SBen Gras.Sh NAME 36a06e2ab3SBen Gras.Nm getty , 37a06e2ab3SBen Gras.Nm uugetty 38a06e2ab3SBen Gras.Nd set terminal modes for system access 39a06e2ab3SBen Gras.Sh SYNOPSIS 40a06e2ab3SBen Gras.Nm 41a06e2ab3SBen Gras.Oo 42a06e2ab3SBen Gras.Ar type 43a06e2ab3SBen Gras.Op Ar tty 44a06e2ab3SBen Gras.Oc 45a06e2ab3SBen Gras.Nm uugetty 46a06e2ab3SBen Gras.Oo 47a06e2ab3SBen Gras.Ar type 48a06e2ab3SBen Gras.Op Ar tty 49a06e2ab3SBen Gras.Oc 50a06e2ab3SBen Gras.Sh DESCRIPTION 51a06e2ab3SBen GrasThe 52a06e2ab3SBen Gras.Nm 53a06e2ab3SBen Grasprogram 54a06e2ab3SBen Grasis called by 55a06e2ab3SBen Gras.Xr init 8 56a06e2ab3SBen Grasto open and initialize the tty line, read a login name, and invoke 57a06e2ab3SBen Gras.Xr login 1 . 58a06e2ab3SBen GrasThe devices on which to run 59a06e2ab3SBen Gras.Nm 60a06e2ab3SBen Grasare normally determined by 61a06e2ab3SBen Gras.Xr ttys 5 . 62a06e2ab3SBen Gras.Pp 63a06e2ab3SBen GrasThe 64a06e2ab3SBen Gras.Nm 65a06e2ab3SBen Grasprogram can also recognize a Point to Point Protocol 66a06e2ab3SBen Gras.Pq Tn PPP 67a06e2ab3SBen Grasnegotiation, and, if the 68a06e2ab3SBen Gras.Sy pp 69a06e2ab3SBen Grasattribute in 70a06e2ab3SBen Gras.Xr gettytab 5 71a06e2ab3SBen Grasis set, invoke the program given by that string, e.g., 72a06e2ab3SBen Gras.Xr pppd 8 , 73a06e2ab3SBen Grasinstead of 74a06e2ab3SBen Gras.Xr login 1 . 75a06e2ab3SBen GrasThis makes it possible to use a single serial port for either a 76a06e2ab3SBen Gras.Qq shell 77a06e2ab3SBen Grasaccount with command line interface, or a 78a06e2ab3SBen Gras.Tn PPP 79a06e2ab3SBen Grasnetwork link. 80a06e2ab3SBen Gras.Pp 81a06e2ab3SBen GrasThe argument 82a06e2ab3SBen Gras.Ar tty 83a06e2ab3SBen Grasis the special device file in 84a06e2ab3SBen Gras.Pa /dev 85a06e2ab3SBen Grasto open for the terminal 86a06e2ab3SBen Gras.Po 87a06e2ab3SBen Grasfor example, 88a06e2ab3SBen Gras.Qq ttyh0 89a06e2ab3SBen Gras.Pc . 90a06e2ab3SBen GrasIf there is no argument or the argument is 91a06e2ab3SBen Gras.Ql Fl , 92a06e2ab3SBen Grasthe tty line is assumed to be open as file descriptor 0. 93a06e2ab3SBen Gras.Pp 94a06e2ab3SBen GrasThe 95a06e2ab3SBen Gras.Ar type 96a06e2ab3SBen Grasargument can be used to make 97a06e2ab3SBen Gras.Nm 98a06e2ab3SBen Grastreat the terminal line specially. 99a06e2ab3SBen GrasThis argument is used as an index into the 100a06e2ab3SBen Gras.Xr gettytab 5 101a06e2ab3SBen Grasdatabase, to determine the characteristics of the line. 102a06e2ab3SBen GrasIf there is no argument, or there is no such table, the 103a06e2ab3SBen Gras.Em default 104a06e2ab3SBen Grastable is used. 105a06e2ab3SBen GrasIf there is no 106a06e2ab3SBen Gras.Pa /etc/gettytab 107a06e2ab3SBen Grasa set of system defaults is used. 108a06e2ab3SBen GrasIf indicated by the table located, 109a06e2ab3SBen Gras.Nm 110a06e2ab3SBen Graswill clear the terminal screen, 111a06e2ab3SBen Grasprint a banner heading, 112a06e2ab3SBen Grasand prompt for a login name. 113a06e2ab3SBen GrasUsually either the banner or the login prompt will include 114a06e2ab3SBen Grasthe system hostname. 115a06e2ab3SBen Gras.Pp 116a06e2ab3SBen Gras.Nm 117a06e2ab3SBen Grasuses the 118a06e2ab3SBen Gras.Xr ttyaction 3 119a06e2ab3SBen Grasfacility with an action of 120a06e2ab3SBen Gras.Qq getty 121a06e2ab3SBen Grasand user 122a06e2ab3SBen Gras.Qq root 123a06e2ab3SBen Grasto execute site-specific commands when it starts. 124a06e2ab3SBen Gras.Pp 125a06e2ab3SBen GrasMost of the default actions of 126a06e2ab3SBen Gras.Nm 127a06e2ab3SBen Grascan be circumvented, or modified, by a suitable 128a06e2ab3SBen Gras.Xr gettytab 5 129a06e2ab3SBen Grastable. 130a06e2ab3SBen Gras.Pp 131a06e2ab3SBen GrasThe 132a06e2ab3SBen Gras.Nm 133a06e2ab3SBen Grasprogram can be set to timeout after some interval, 134a06e2ab3SBen Graswhich will cause dial up lines to hang up 135a06e2ab3SBen Grasif the login name is not entered reasonably quickly. 136a06e2ab3SBen Gras.Pp 137a06e2ab3SBen GrasThe 138a06e2ab3SBen Gras.Nm uugetty 139a06e2ab3SBen Grasprogram is the same, except that it uses 140a06e2ab3SBen Gras.Xr pidlock 3 141a06e2ab3SBen Grasto respect the locks in 142a06e2ab3SBen Gras.Pa /var/spool/lock 143a06e2ab3SBen Grasof processes that dial out on that tty. 144a06e2ab3SBen Gras.Sh FILES 145a06e2ab3SBen Gras.Bl -tag -width /var/spool/lock/LCK..ttyXX -compact 146a06e2ab3SBen Gras.It Pa /etc/gettytab 147a06e2ab3SBen Gras.It Pa /etc/ttys 148*84d9c625SLionel Sambuc.It Pa /usr/libexec/getty 149a06e2ab3SBen Gras.It Pa /var/spool/lock/LCK..ttyXX 150a06e2ab3SBen Gras.El 151a06e2ab3SBen Gras.Sh DIAGNOSTICS 152a06e2ab3SBen Gras.Bl -diag 153a06e2ab3SBen Gras.It "ttyxx: No such device or address." 154a06e2ab3SBen Gras.It "ttyxx: No such file or address." 155a06e2ab3SBen GrasA terminal which is turned on in the 156a06e2ab3SBen Gras.Xr ttys 5 157a06e2ab3SBen Grasfile cannot be opened, likely because the requisite 158a06e2ab3SBen Graslines are either not configured into the system, the associated device 159a06e2ab3SBen Graswas not attached during boot-time system configuration, 160a06e2ab3SBen Grasor the special file in 161a06e2ab3SBen Gras.Pa /dev 162a06e2ab3SBen Grasdoes not exist. 163a06e2ab3SBen Gras.El 164a06e2ab3SBen Gras.Sh SEE ALSO 165a06e2ab3SBen Gras.Xr login 1 , 166a06e2ab3SBen Gras.Xr ioctl 2 , 167a06e2ab3SBen Gras.Xr pidlock 3 , 168a06e2ab3SBen Gras.Xr ttyaction 3 , 169a06e2ab3SBen Gras.Xr tty 4 , 170a06e2ab3SBen Gras.Xr gettytab 5 , 171a06e2ab3SBen Gras.Xr ttys 5 , 172a06e2ab3SBen Gras.Xr init 8 , 173a06e2ab3SBen Gras.Xr pppd 8 174a06e2ab3SBen Gras.Sh HISTORY 175a06e2ab3SBen GrasA 176a06e2ab3SBen Gras.Nm 177a06e2ab3SBen Grasprogram appeared in 178a06e2ab3SBen Gras.At v6 . 179