Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttymon(1M) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pmadm(1M)

sac(1M)

sacadm(1M)

ttyadm(1M)






       ttymon(1M)                                                ttymon(1M)


       NAME
             ttymon - port monitor for terminal ports

       SYNOPSIS
             /usr/lib/saf/ttymon
             /usr/lib/saf/ttymon -g [-h] [-d device] [-l ttylabel] [-t timeout]
                   [-p prompt] [-m modules]

       DESCRIPTION
             ttymon is a STREAMS-based TTY port monitor.  Its function is
             to monitor ports, to set terminal modes, baud rates, and line
             disciplines for the ports, to identify and authenticate users,
             if required, and to connect users or applications to services
             associated with the ports.  Normally, ttymon is configured to
             run under the Service Access Controller, sac, as part of the
             Service Access Facility (SAF).  This is commonly referred to
             as Daemon Mode.  It is configured using the sacadm(1M)
             command.  Each instance of ttymon can monitor multiple ports.
             The ports monitored by an instance of ttymon are specified in
             the port monitor's administrative file.  The administrative
             file is configured using the pmadm and ttyadm commands.  When
             an instance of ttymon is invoked by the sac command, it starts
             to monitor its ports.  If ttymon is disabled, all ports under
             that instance of ttymon will also be disabled.  For each port,
             ttymon first initializes the line discipline, and the speed
             and terminal settings.  The values used for initialization are
             taken from the appropriate entry in the TTY settings file.
             This file is maintained by the sttydefs command.  An
             alternative method of invoking ttymon is the Express Mode that
             is used to monitor a single port.

             ttymon then writes the prompt and waits for user input.  If
             the user shows that the speed is inappropriate by pressing the
             BREAK key, ttymon hunts to the next ttylabel in the
             /etc/ttydefs file, adjusts termio(7) values, and writes the
             prompt again.  When valid input is received, that is, one or
             more non-break keys followed by a newline, ttymon interprets
             the per-service configuration file for the port, if one
             exists, invokes the identification and authentication scheme,
             if one is specified, creates a utmp entry if required,
             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 utmp entry, if one exists, and returns the port to its
             initial state.


                           Copyright 1994 Novell, Inc.               Page 1













      ttymon(1M)                                                ttymon(1M)


            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 1200, 2400, 4800, 9600, 19200,
            and 38400.

            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, cu or ct to use it for dialing out.  If a
            port is bidirectional, ttymon will wait to read a character
            before it prints a prompt.  The bidirectional port option is
            supported only in Daemon Mode; it is not supported in Express
            Mode.

            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.

         Service Invocation
            The service ttymon invokes for a port is specified in the
            ttymon administrative file.  ttymon scans the character string
            that gives the service to be invoked, looking for one of the
            two-character sequences %d and %%.  If %d is found, ttymon
            modifies the service command to be executed by replacing these
            two characters with the full path name of the port (the device
            name).  If %% is found, ttymon replaces the two characters
            with a single %.  When the service is invoked, file
            descriptors 0, 1, and 2 are opened to the port device for
            reading and writing.

            If an authentication scheme is specified in the ttymon
            administrative file and there is no entry in the ID field
            (this is the default case), the service is invoked with the
            user ID , group ID , and current home directory set, through
            set_id, to the user name that is identified and authenticated
            by the authentication scheme.  If both a user ID and an
            authentication scheme are specified in the ttymon
            administrative file, the authentication scheme is executed
            first, then the user ID is set, using the value in the


                          Copyright 1994 Novell, Inc.               Page 2













       ttymon(1M)                                                ttymon(1M)


             administrative file, not the value given by the authentication
             scheme.  The login authentication scheme is the scheme most
             commonly associated with ttymon.  [See login(1)].

             ttymon adds two environment variables, HOME and TTYPROMPT to
             the service's environment.  HOME is set to the HOME directory
             of the user name under which the service is invoked.
             TTYPROMPT is set to the prompt string configured for the
             service on the port.  This is provided so that a service
             invoked by ttymon has a means of determining if a prompt was
             actually issued by ttymon and, if so, what that prompt
             actually was.

          Trusted Path Invocation
             The Trusted Path invocation must be used with security.  It
             enforces its own device locking and guarantees channel
             disconnection on hangup.  TP_DEFAULT is a variable set in the
             etc/default/tpath file.  It can be set to either YES or NO.
             If this variable is set to YES, the normal ttymon with TP is
             run.  If this variable is set to NO, a modified ttymon that
             does not build TP is run.  This is the default position.

             To administer the Trusted Path invocation use the following
             command:

             defadm tpath TP_DEFAULT=YES

             See ttyadm(1M) for options that can be set for ports monitored
             by ttymon under the Service Access Controller.

             It is recommended that tty ports be  monitored  by  ttymon  in
             Daemon  Mode,  with  the  exception of a console where Express
             Mode can be used.

          Options
             In Express Mode (or standalone) ttymon takes the following
             options:

            -v     On startup, ttymon will list all open virtual terminals
                    (vts) associated with the device specified (typically
                    /dev/console).  On exit, the user will be prompted to
                    close all open vts either manually or automatically.
                    Choosing manual places the user in the highest numbered
                    vt at which point the user must manually exit from each
                    vt.  Choosing automatic will cause the signals SIGHUP
                    and SIGTERM to each open vt, then after 3 seconds


                           Copyright 1994 Novell, Inc.               Page 3













      ttymon(1M)                                                ttymon(1M)


                   SIGTERM will be sent to each open vt to ensure
                   termination.

                  For systems running with the Enhanced Security Utilities
                   installed, the -v option will disable trusted path
                   processing.  [See ttyadm(1M)].

           -g     A special invocation of ttymon is provided with the -g
                   option.  This option is used for the ttymon Express
                   Mode.  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 to invoke the LOGIN
                   authentication scheme and then connect to a service,
                   but that cannot be pre-configured under the SAC . The
                   following combinations of options can be used with -g:

                  -d device
                          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.

                  -h     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.

                  -t timeout
                          Specifies that ttymon should exit if no one
                          types anything in timeout seconds after the
                          prompt is sent.

                  -l ttylabel
                          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 shows that the speed is
                          inappropriate by pressing the BREAK key.  The
                          default speed is 9600 baud.

                  -p prompt
                          Allows the user to specify a prompt string.  The
                          default prompt is
                                  login:



                          Copyright 1994 Novell, Inc.               Page 4













       ttymon(1M)                                                ttymon(1M)


                   -m modules
                           modules is a comma-separated list of pushable
                           modules.  When initializing the port, ttymon
                           will pop all modules on the port and then push
                           modules in the order specified.  The line
                           discipline module ldterm is commonly used for
                           terminal ports.

          Files
             /usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
                   language-specific message file [See LANG on environ(5).]

       REFERENCES
             pmadm(1M), sac(1M), sacadm(1M), ttyadm(1M)

       NOTICES
             If a port is monitored by more than one ttymon, it is possible
             for the ttymons to send out prompt messages in such a way that
             they compete for input.

             ``Smart modems'' are ones that can communicate at different
             speeds between the line and the serial port.  Do not use the
             autobaud feature for smart modems for incoming or
             bidirectional lines.  A good choice for smart modems is the
             highest baud rate that the modem can support.  Use the same
             speed for outgoing cu connections that ttymon uses to monitor
             incoming connections or the modem will continue to use the
             speed specified by the cu.

             Smart modems that send result codes can result in a premature
             runtime connection indication.  This behavior can be handled
             by the appropriate modem commands or by using the -r option
             for ttyadm, and enabling the Daemon Mode.  See ttyadm(1M) for
             more information.

             Certain applications will only work successfully if TP_DEFAULT
             is set to NO and your machine is rebooted.  This is the
             default so a reboot is not required unless TP_DEFAULT has been
             set to YES previously.

             It is recommended that you use default settings on your
             modems.  However, when you want to have the DTR held high on
             exit for a longer time, in the Daemon Mode add the line:
             'assign DTR_DELAY=xxx' to the /etc/saf/pmtag/_config file.  In
             the Express Mode, add: sh -c 'DTR_DELAY=xxx ttymon -g . . . '
             to the /etc/inttab file.  In both cases, xxx is in


                           Copyright 1994 Novell, Inc.               Page 5













      ttymon(1M)                                                ttymon(1M)


            milliseconds.















































                          Copyright 1994 Novell, Inc.               Page 6








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026