HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)

g
getty(1M) getty(1M)
Operation
Testing /etc/gettydefs
With the -c option, getty tests file against the rules for
/etc/gettydefs
(see gettydefs(4)), prints
error messages and flag values to standard output, and terminates.
This is a good way to test a revised
/etc/gettydefs file before putting it into operation.
Normal Execution
Without the
-c option, getty opens the port interface for line, sets the speed, terminal parameters, and
login message, prompts for login information, and passes control to the
login program, as follows.
1.
getty determines the speed, terminal parameters, and login message.
If the speed operand is given,
getty selects that entry from /etc/gettydefs
and sets the
terminal parameters and login message to the given values.
If speed is not found in
/etc/gettydefs or the speed operand is omitted,
getty selects the
first entry from
/etc/gettydefs
and sets the terminal parameters and login message to the
given values.
If
/etc/gettydefs is missing or unreadable or has errors,
getty sets the speed of the
interface to 300 baud, sets the login message to
LOGIN:, and sets the terminal parameters to:
use raw mode (awaken on every character), suppress echo, allow either parity, convert newline
characters to carriage-return-linefeed, and perform tab expansion on standard output,
If type or linedesc is given, the terminal parameters are adjusted appropriately.
The special control characters are defined. If the -f option is given, they are read from the
/dev/ttyconf file. See the Special Control Characters section for detail.
getty connects to the terminal port, applying all the terminal parameters. It forces a hangup
on the line by setting the speed to zero, except if the port is opened in direct mode or if the
-h
option was specified.
2. getty prompts for and reads a line of login information.
If the /etc/issue file exists, it is displayed.
The login message is displayed.
getty reads the user name and optional arguments from the port. The one-line parsed input is
limited to 255 characters and 64 whitespace-delimited words. The special control characters
affect the input. See the Special Control Characters section for detail.
If a null character or a framing error is received, it is assumed to be the result of the user push-
ing the break key. This causes getty to attempt the next speed in the current
/etc/gettydefs series, repeating step 1.
The input line is terminated with a newline or carriage return character. If the latter, the sys-
tem is set to receive carriage returns appropriately (see termio(7)).
The user’s name is scanned to see if it contains any lowercase alphabetic characters. If it does
not, and if the name is nonempty, the system is told to map any future uppercase characters into
the corresponding lowercase characters.
3.
getty passes control to login.
getty passes the parsed user name and optional arguments, along with the terminal parame-
ters, to the login program (see exec(2)).
login performs user validation (for example, password processing) and login retries, places the
optional arguments in environment variables, and passes control to the shell. See login(1) for
details.
4. On termination, control returns to init.
When getty,orlogin, or the shell terminate for any reason, control reverts to init.
If the respawn action is defined for the device file in /etc/inittab , init reruns the
getty command, and the process resumes at step 1 (see inittab(4)).
HP-UX 11i Version 3: February 2007 2 Hewlett-Packard Company 287