Sets the characteristics of ports.
The getty command sets and manages terminal lines and ports. The getty command is run by the init command. The getty command is linked to the Terminal State Manager program. The Terminal State Manager program provides combined terminal control and login functions.
You can configure the getty command to create your home directory at your login if you do not have a home directory already. The getty command calls the mkuser.sys command to create the home directory and customize the account. To enable this capability, set the mkhomeatlogin attribute of the usw stanza in the /etc/security/login.cfg file to true.
Note: The getty command is not entered on the command line.
When invoked as the getty command, the Terminal State Manager program provides the normal port management functions that include:
Item | Description |
---|---|
Bidirectional use | Allows terminal lines to be used to initiate and accept connections. |
Line speed | Sets the baud rates for sending and receiving. |
Parity | Sets the parity to be even, odd or none. |
Delays | Sets the delays for carriage return, tab, new line, and form feed. |
Character set mapping | Sets the character set mapping for case, tabs, and carriage control. |
Logger Program | Specifies the program used to log the user into the system. If the attribute is set, the Secure Attention Key (SAK) processing is disabled. If the attribute is not set, it defaults to /usr/sbin/login. The logger attribute is contained within the Object Data Manager (ODM) database. |
Character and line erase | Sets the keystroke used for character and line erase. |
Echoing mode | Sets the echo to local or remote. |
When the getty command is invoked, the following steps occur:
Item | Description |
---|---|
-d | Provides debugging information. |
-H HeraldString | Specifies an alternate herald message to write on the port to prompt for a login name. The message string must be one word and cannot contain any spaces. This string will take precedence over herald messages defined in the /etc/security/login.cfg file. If no string is specified with this option or in the login.cfg file, the default herald from the message catalog will be used. |
-M motdFile | Specifies the path to an alternate message of the day file. If not specified, this value is /etc/motd by default. |
-N | Causes getty to bypass any checking for the process ID in the /etc/utmp file. This allows a process other than the lowest login shell to exec getty. |
-r | Makes the port available for shared (bi-directional) use. If the lock is unsuccessful, the getty command waits until the lock is available and then exits. If the lock is successful, the getty command waits for a byte of data on the port after locking the port. |
-u | Makes the port available for shared (bi-directional) use. If the lock is unsuccessful, the getty command waits until the lock is available and then exits. |
-U | Same as the -u flag, except getty does not wait for the lock to be available. It makes the port available regardless of the lock. |
Access Control: This program should be installed as a program in the Trusted Computing Base, executable by any user and setuid to root.
To enable logging onto tty0, add the following line to the /etc/inittab file:
tty0:2:respawn: /usr/sbin/getty /dev/tty0
This command initializes the port /dev/tty0 and sets up the characteristics of the port.
Item | Description |
---|---|
/usr/sbin/getty | Contains the getty command. |
/etc/locks | Contains lock files that prevent multiple uses of communications devices and multiple calls to remote systems. |
/usr/sbin/login | The login command. |
/etc/security/login.cfg | Contains port login configurations. |
/etc/motd | Contains the message of the day displayed after login. |
/usr/bin/setmaps | The setmaps command. |
/etc/utmp | Contains information about users logged into the system. |