Copyright 1989 AT&T
Copyright (C) 2004, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
/usr/lib/saf/ttymon
/usr/lib/saf/ttymon -g [-d device] [-h] [-t timeout] [-l ttylabel] [-p prompt] [-m modules] [-T termtype]
ttymon then writes the prompt and waits for user input. If the user indicates that the speed is inappropriate by pressing the BREAK key, ttymon tries the next speed and writes the prompt again. When valid input is received, ttymon interprets the per-service configuration file for the port, if one exists, creates a utmpx entry if required (see utmpx(5)), establishes the service environment, and then invokes the service associated with the port. Valid input consists of a string of at least one non-newline character, terminated by a carriage return. After the service terminates, ttymon cleans up the utmpx entry, if one exists, and returns the port to its initial state.
If autobaud is enabled for a port, ttymon will try to determine the baud rate on the port automatically. Users must enter a carriage return before ttymon can recognize the baud rate and print the prompt. Currently, the baud rates that can be determined by autobaud are 110, 1200, 2400, 4800, and 9600.
If a port is configured as a bidirectional port, ttymon will allow users to connect to a service, and, if the port is free, will allow uucico(8), cu(1C), or ct(1C) to use it for dialing out. If a port is bidirectional, ttymon will wait to read a character before it prints a prompt.
If the connect-on-carrier flag is set for a port, ttymon will immediately invoke the port's associated service when a connection request is received. The prompt message will not be sent.
If a port is disabled, ttymon will not start any service on that port. If a disabled message is specified, ttymon will send out the disabled message when a connection request is received. If ttymon is disabled, all ports under that instance of ttymon will also be disabled.
See ttyadm(8) for options that can be set for ports monitored by ttymon under the Service Access Controller.
NAME TYPE TTYMON OPTION ---------------------------------------------------------- device astring [-d device] nohangup boolean [-h] label astring [-l label] modules astring [-m module1,module2] prompt astring [-p prompt] timeout count [-t timeout] terminal_type astring [-T termtype]
If any value is the empty string or an integer set to zero, then the option is not passed to the ttymon invocation. The -g option is always specified for this invocation. The -d option always defaults to /dev/console if it is not set.
See EXAMPLES.
ttymon session required /usr/lib/security/pam_unix_session.so.1
If there are no entries for the ttymon service, then the entries for the "other" service will be used.
A special invocation of ttymon is provided with the -g option. This form of the command should only be called by applications that need to set the correct baud rate and terminal settings on a port and then connect to login service, but that cannot be pre-configured under the SAC. The following combinations of options can be used with -g:
device is the full path name of the port to which ttymon is to attach. If this option is not specified, file descriptor 0 must be set up by the invoking process to a TTY port.
If the -h flag is not set, ttymon will force a hangup on the line by setting the speed to zero before setting the speed to the default or specified speed.
ttylabel is a link to a speed and TTY definition in the ttydefs file. This definition tells ttymon at what speed to run initially, what the initial TTY settings are, and what speed to try next if the user indicates that the speed is inappropriate by pressing the BREAK key. The default speed is 9600 baud.
When initializing the port, ttymon will pop all modules on the port, and then push modules in the order specified. modules is a comma-separated list of pushable modules. Default modules on the ports are usually set up by the Autopush Facility.
Allows the user to specify a prompt string. The default prompt is Login:.
Specifies that ttymon should exit if no one types anything in timeout seconds after the prompt is sent.
Sets the TERM environment variable to termtype.
The following example sets the value of the terminal type (-T) option for the system console ttymon invocation:
svccfg -s svc:/system/console-login setprop \e ttymon/terminal_type = "xterm" svcadm refresh svc:/system/console-login:default
Determines how ttymon handles characters. When LC_CTYPE is set to a valid value, ttymon can display and handle text and filenames containing valid characters for that locale. ttymon can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. ttymon can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
The command-line syntax is Stable. The SMF properties are Evolving.
The pam_unix(7) module is no longer supported. Similar functionality is provided by pam_authtok_check(7), pam_authtok_get(7), pam_authtok_store(7), pam_dhkeys(7), pam_passwd_auth(7), pam_unix_account(7), pam_unix_auth(7), and pam_unix_session(7).