PORTS(5,F) AIX Technical Reference PORTS(5,F)
-------------------------------------------------------------------------------
ports
PURPOSE
Describes the ports.
DESCRIPTION
The ports file contains the names and characteristics of all the system
terminal ports. It provides a convenient means to associate values with named
keyword parameters on a port-by-port basis, with defaults supplied as desired.
The getty process is the principal user of the information in this file. Since
programs using this file look for specific keyword parameters and ignore all
others, parameters other than those discussed here can be added to this file as
necessary.
File Format
The ports file consists of one or more named stanzas usually separated by blank
lines. Each stanza begins with its name followed by a colon, and contains
assignments of values to keyword attributes. The values, in turn, may be
alphanumeric strings or arbitrary character strings enclosed in double quotes.
Stanzas headed by the name default specify attribute-value pairs that are
associated with all of the ports following it to the next default stanza.
Explicit values within a port stanza override this association.
Port-Control Parameters
Most of the parameters in the ports file are port controls for login terminals.
Because there are system defaults, specified in the getty process, it is not
usually necessary to specify more than a few attributes in the ports file, as
in the example. The port control parameters and their meanings are as follows:
aa When the value of aa is TRUE, the following Hayes modem command
sequences are output:
+++ Hayes command escape sequence.
atz Reset modem to default settings as determined by
switches.
ATE0q1C1 No echo, no result codes, carrier enabled.
ats0=1 Auto answer after first ring.
chat If aa=TRUE, then string (in chat = string) will be output.
Processed November 7, 1990 PORTS(5,F) 1
PORTS(5,F) AIX Technical Reference PORTS(5,F)
enabled The getty program uses this attribute to determine if special
printing of the login prompt is needed. If the port should permit
a logger, the value may be TRUE, SHARE, or DELAY. (To disable a
port, use the devices command as described in the AIX Operating
System Commands Reference.) Normally the value of TRUE is used if
the port is to be enabled; however, if the port is to be shared
(bi-directional use), then the value should be SHARE or DELAY. The
value SHARE is used to make the port bi-directional with the
device-locking scheme used by uucp, cu, ate and connect. DELAY
operates like SHARE except that one or more characters must be read
from the port by the getty process before the login herald will be
printed. DELAY is useful with direct connections and intelligent
modems. The penable, pshare, pdelay, pdisable, and phold commands
will override the value specified by directly modifying
/etc/inittab and sending a signal to the init process.
eof An octal integer specifying the character code that causes an end
of file to be generated from the terminal. The system default is
004 (or 0x04), the ASCII EOT character, which is generated by
Ctrl-D.
eol An optional and seldom-used alternate line termination character to
use in addition to the ASCII new-line (line-feed) character.
erase An octal integer specifying the character code that deletes the
previously received character. The system default for the erase
character is 010 (or 0x08), Ctrl-h, which is generated by the
Backspace key on many terminals.
herald An arbitrary string, enclosed in double quotes, printed by the
getty process to prompt for login. The C language \(backslash)
escapes \r, \n, \t, \b, and \f are recognized as carriage return,
new-line, tab, backspace, and formfeed, respectively.
imap This attribute is used by getty to set the terminal input map. If
imap is not specified, getty resets the map to the system default.
intr An octal integer specifying the character code that interrupts the
running process. The system default is 0177 (or 0x7f), which is
usually generated by a key labeled Del or Rubout.
kill An octal integer specifying the character code that deletes the
input line. The system default for the kill character is 025 (or
0x15), Ctrl-u, which is the ASCII NAK character.
lang This parameter defines the default value for the LANG environment
variable of the programs started on the specified port.
lock This attribute is used to request port locking. If the value is
TRUE, init creates a file in /etc/locks when the port is enabled
and deletes the lock file when the port is disabled. Similarly,
penable does not enable a port whose lock attribute is TRUE when
Processed November 7, 1990 PORTS(5,F) 2
PORTS(5,F) AIX Technical Reference PORTS(5,F)
the corresponding lock file exists. Programs using the port for
some other purpose (such as a link between processors) should check
for an outstanding lock (and create a lock file, if necessary)
before opening the port.
log This parameter causes logins to be recorded for a port on the
console or in file /usr/adm/sulog. If log=true, all logins are
reported, and if log=root, logins by root (superuser) are recorded.
See super parameter on 4 for related information.
logger A character string giving the names the program is to use at login.
The default is /bin/login.
logmodes Console modes in effect while prompting for and reading in the user
name. Modes are specified as a series of terminal options
separated by a + (plus). Terminal options are as listed in the
stty command. All listed modes not preceded with - (dash) are
recognized. For example, the default logmodes parameter is
specified as:
logmodes = cread+cs8+hupcl+echoe+echok
Because a speed value is not recognized in logmodes under any
circumstances, the baud rate must be set with the speed parameter
(see below).
min See the discussion of ICANON under "termio."
omap This attribute is used by getty to set the terminal output map. If
omap is not specified, getty resets the map to the system default.
owner Normally, when a port is logged in, the login program sets the
logged-in user to be the owner of that port. Specifying an owner
(either a UID or user name), the system manager forces the getty
process to set ownership even before opening the port.
parity The values ODD, EVEN, and NONE cause the generation of odd, even,
and no parity, respectively, while inpck, ignpar, and parmrk cause
the checking input for parity errors, ignoring input characters
with parity errors, and "marking" input parity errors as specified
under "termio." These values can be combined, as in
"parity=odd+inpck".
program If a value is specified, it is taken as the name of a program to
run immediately after setting the logmodes. This feature is useful
for establishing special purpose server ports that respond to a
connection with a special protocol handler. If the special
assignment program=HOLD is specified, no program runs on the port,
but the logmodes, ownership, and protection are set and the port is
held open. This is useful to keep the desired modes associated
with a port that is occasionally seized for some special purpose.
Processed November 7, 1990 PORTS(5,F) 3
PORTS(5,F) AIX Technical Reference PORTS(5,F)
protection Normally the protection on terminal is set to rw--w--w- (octal 622
or 0x192). The protection parameter overrides this default. The
value can be set to an octal mask or a string such as rw-rw-rw-
(octal 666 or 0x1b6).
quit An octal integer specifying the character code that causes the
running process to abort. The system default is 026 (or 0x16),
which is generated by pressing Ctrl-V.
runmodes Console modes in effect after the user name is read. The mode in
which the port is left, specified similar to logmodes.
speed A decimal integer from the set {50, 75, 110, 134.5, 150, 300, 600,
1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200} depending on
the hardware capability.
super This parameter is passed on the logger in its environment. If
super=false, then login does not allow root (the superuser) to log
in on the port. This is useful for security on off-site terminal
connections such as telephone links. (See log parameter, on page
3.)
term This parameter is passed to the logger and shell in their
environment (see "environment") in the variable TERM. Some
application software uses this information to determine the type of
terminal the user is using.
time See the discussion of ICANON under "termio."
timeout A decimal integer. If a user name is not specified before the
given number of seconds, the getty process advances to the next
port setting, or exits if all settings were exhausted.
Multiple values, separated by commas, can be specified as in the speed=300,1200
line for dial-in terminals. This causes the port to be set up according to the
first set of values for each attribute. If a framing error occurs, as a result
of a user-generated BREAK on the line or a speed mismatch between the terminal
and the set speed, the getty process advances to the next value on the list.
If multiple specifications occur for more than one parameter, all are advanced
at the same time. Thus, a specification such as:
speed=300,1200
parity=none,odd+inpck
first tries the line at 300 baud with no parity. If a framing error occurs, it
tries 1200 baud generation and checks for odd parity.
Other Port Parameters
The ports file has all the port-specific information, not just information
about loggers. The other parameters in the file are:
Processed November 7, 1990 PORTS(5,F) 4
PORTS(5,F) AIX Technical Reference PORTS(5,F)
loc The location of the terminal connected to the port. This parameter
is presently unused by any AIX software. Because programs that
access this file ignore keywords they do not use, helpful
information can be added to keep all port-specific information
together in one area.
printer The hard copy device used for output from optional word processing
packages.
EXAMPLE
The following example of a ports file illustrates some of its features:
default:
enabled = false
speed = 9600
herald = "\r\n\r\n ps2aix PS/2 login: "
logmodes = echoe+hupcl+parenb+cs7
runmodes = parenb+cs8+hupcl+cread+clocal+brkint+istrip
+icrnl+ixon+isig+icanon+echo+echoe+echok
+opost+onclr+tab3
parity = true
/dev/console:
term = ibm 8513
enabled = true
herald = "\r\n\r\n ps2aix PS/2 Console login:"
FILES
/etc/ports
/etc/locks
RELATED INFORMATION
In this book: "attributes," "connect.con," "environment," and "termio."
The su, pstart, pdisable, getty, login, init, and stty commands in AIX
Operating System Commands Reference.
"Introduction to International Character Support" in Managing the AIX Operating
System.
Processed November 7, 1990 PORTS(5,F) 5