home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / wUUCP_0.0.29.lha / man / Getty.doc < prev    next >
Encoding:
Text File  |  1994-06-12  |  12.0 KB  |  273 lines

  1.  
  2. NAME
  3.         Getty
  4.  
  5. SYNOPSIS
  6.         Getty -Sserialname -Uunit -Bbaud -Bbaud.. -Mc -bn -ln
  7.               -m1 -r0 -h0 -c0 -d0 -xn -A -7 -0 [modem-cmds]
  8.  
  9. FLASH!
  10.         Getty now works with multi-serial ports.  The 1.08 and 1.09
  11.         getty were broken due to bugs in the serial.device ... the 1.10
  12.         Getty now fixes this by introducing file locking constructs to
  13.         lock the serial port instead of intercepting the device vectors.
  14.  
  15.         IN ORDER TO BEHAVE WELL WITH GETTY, YOU MUST USE THE LockSerial
  16.         command to run any external programs that use that particular
  17.         serial port.  You can no longer run terminal programs direct
  18.         because they are no longer locked out by getty if getty is
  19.         accepting a call.  The program LOCKSERIAL may be used to
  20.         synchronously run terminal programs without requiring one to
  21.         kill Getty.
  22.  
  23.         HOWEVER, programs run *FROM* a password entry should NOT use
  24.         LockSerial becaues the port has already been locked by getty
  25.         for the program.
  26.  
  27.         NOTE: Programs run with lockserial must not auto-detach from the
  28.         CLI or lockserial will believe that they have exited and give the
  29.         port back to Getty, causing major problems.
  30.  
  31. DESCRIPTION
  32.         Getty hangs on the specified serial port (serial.device unit 0 by
  33.         default) waiting for connections via the connected modem.  Once
  34.         a connection is accepted Getty adjusts to the proper baud rate
  35.         using the CONNECT message, -B, -A options, then provides a
  36.         Login: request to the caller.
  37.  
  38.         NOTE: A CONNECT message from the modem with no baud rate specified
  39.         will cause Getty to use the first baud rate in the -B list.  If
  40.         the -A option is specified, Getty *always* uses the first baud
  41.         rate in the -B list and never switches to any other baud rate.
  42.  
  43.         Getty disconnects any caller who cannot provide a legal Login and
  44.         Password within 60 seconds.  It also allows only 5 login attempts
  45.         before disconnecting, and any illegal password will result in a
  46.         4 second delay before the next Login: prompt is output.
  47.  
  48.         Upon receiving a legal Login and and Password, verified via
  49.         UULIB:PASSWD, Getty will execute the program specified in
  50.         UULIB:PASSWD, usually UUCICO, and stay off the line until
  51.         UUCICO returns.  When UUCICO returns, Getty will disconnect
  52.         the caller and reset the modem, returning to its original state.
  53.  
  54.         The file UULIB:Getty-Header contains a couple lines of text
  55.         that are sent over the serial port before the Login: request.
  56.         In it you normally have your machine type, name, etc...
  57.         You may supply different UULIB:Getty-Header files for each of
  58.         your multiple serial ports (if you have more than one =:->).
  59.         Getty distinguishes between the several ports by labelling them
  60.         "tty" + first two characters of the device it's talking to +
  61.         the unit number. That means, a getty listening on serial.device
  62.         unit 0 labels that port "ttyse0", a getty listening on bscisdn.-
  63.         device unit 8 labels that port "ttybs8". Getty tries to use
  64.         UULIB:Getty-Header.ttyname before UULIB:Getty-Header internally,
  65.         that is if you have a modem listening on serial.device unit 0 and
  66.         3 getty listening on bscisdn.device 0, 1, and 8 (as I do =:->),
  67.         and can create UULIB:Getty-Header and UULIB:Getty-Header.ttybs8,
  68.         all gettys except the one on bscisdn.device unit 8 would use
  69.         UULIB:Getty-Header but the latter would use UULIB:Getty-Header.tty-
  70.         bs8. Hope I made it clear, next release shall include a better ex-
  71.         planation ...
  72.  
  73.         Getty runs the specified program in the password entry adding
  74.         the following arguments:
  75.  
  76.             -Getty -DEVICE devicename -UNIT unitnumber
  77.  
  78.         (uucico will recognize said arguments and not attempt to
  79.          initialize / waitfor calls / hangup the modem itself, nor
  80.          will uucico attempt to lock the already locked serial port)
  81.  
  82. TECH NOTES
  83.         In order to monitor the request lock for the serial port (see
  84.         UUMAN:LockSerial and src/util/lockserial.c), GETTY must open
  85.         a file in T: for write and then close it every 3 seconds.  Thus,
  86.         T: should be in your RAM disk.
  87.  
  88. OPTIONS
  89.         Options are given on the command line when you run Getty.  You can
  90.         also UPDATE a currently running Getty's options by running Getty
  91.         for the same device and unit again with the options that need to
  92.         be changed.  Getty will detect whether another getty is already
  93.         running on that port and send the new options to the running getty,
  94.         then return.
  95.  
  96.  
  97.         -Sserialname        Specify serial device, default "serial.device"
  98.  
  99.         -Uunit              Specify unit number, default 0
  100.  
  101.         -Bbaud              Specify up to 32 baud rates
  102.  
  103.         -A                  Specify modem will adjust to a single baud
  104.                             rate (locks the serial.device at the first
  105.                             baud rate in the -B list)
  106.  
  107.         -7                  Use SERF_7WIRE protocol while online,
  108.                             else uses no protocol while online.  If
  109.                             you are using a modem with speed conversion
  110.                             you need this option or you will most likely
  111.                             overflow the modem's buffer!
  112.  
  113.         -Mc                 Select Modem type,
  114.  
  115.                             c = m   Multimodem
  116.                                 h   Hays
  117.                                 d   Dumb  (no AT or +++ commands are
  118.                                            sent to the modem ever).
  119.  
  120.         -mn                 Set modem speaker level, default 0.
  121.                             (ATMn command)
  122.  
  123.         -rn                 Set modem to answer on the Nth ring
  124.                             (modem must support ATMn).  0 disables
  125.                             answer capability.  The default is to
  126.                             answer on the second ring.
  127.  
  128.         -h0                 Ignore CD (carrier detect).  If this option
  129.                             is specified a continuous carrier detect is
  130.                             assumed, causing Getty to request Login:'s
  131.                             over the line as soon as it receives a CONNECT
  132.                             message.
  133.  
  134.                             It is suggested you ONLY use this option
  135.                             when combined with -c0
  136.  
  137.         -c0                 Do NOT look for a CONNECT message from the
  138.                             modem... useful for dumb modems.
  139.  
  140.         -d0                 Normally Getty will disconnect by dropping
  141.                             DTR.  If this option is specified, Getty will
  142.                             use the less reliable +++ ATH0 sequence.
  143.  
  144.                             NOTE: If your modem has the capability to LOCK
  145.                             the COMPUTER'S SERIAL PORT baud rate, it is
  146.                             *strongly* suggested that you do this for +++
  147.                             to be reliable.
  148.  
  149.         -xn                 Set debugging level to n.  If specified
  150.                             debugging messages are sent to stdout instead
  151.                             of UULIB:LOGFILE
  152.  
  153.                             Note: to avoid UULIB:LOGFILE getting too
  154.                             large for busy systems, you can always add
  155.                             an entry to your crontab to delete it once
  156.                             a week (or whenever), or use 'trimfile' to
  157.                             trim it.
  158.  
  159.         -l1                 add -HLINK option to commands started by
  160.                             Getty.
  161.  
  162.         -bn                 n = 1:  add -BAUD <baud> option to commands
  163.                                     started by Getty, this informs the run
  164.                                     command what the actual connect baud
  165.                                     rate is regardless of the serial port
  166.                                     communications baud rate (which is al-
  167.                                     ready preset by getty for the application)
  168.                             n = 0:  Do not add -BAUD to command line
  169.  
  170.         -un                 n = 0:  Do not add -USER to command line
  171.                             n = 1:  Add -USER <user> to commands started
  172.                             n = 2:  Set several local variables USER,
  173.                                     REALNAME, SHELL, HOME ...
  174.  
  175.         -Tn                 Controls timeout for spawned shells.
  176.                             n = 0: normal timeout (10 minutes)
  177.                             n = 1: NO timeout
  178.  
  179.                             When spawning a shell and $HOME/.login exists, it is
  180.                             executed during startup ...
  181.  
  182.         -0                  Kill any already-running Getty for this
  183.                             serial port and unit.
  184.  
  185.         modem-cmds          You may specify up to 16 specific commands
  186.                             to be sent to the modem whenever it is
  187.                             initialized (usually after a disconnect
  188.                             and on startup).  Each command will be
  189.                             sent to the modem with a CR on the end and
  190.                             a seconds delay afterwords.  Example:
  191.  
  192.                             ATS2=.
  193.  
  194.                             This is useful for provided specialized
  195.                             modems with the appropriate initialization
  196.                             strings.
  197.  
  198. EXAMPLE
  199.         ;   Run a Getty for a MultiModem
  200.  
  201.         run >nil: <nil: Getty -Mm -A -B19200
  202.  
  203.         ;   Run a Getty for a Hays Modem
  204.  
  205.         run >nil: <nil: Getty -Mh -B1200 -B2400
  206.  
  207.         ;   Run a Getty for a Hays Modem and use +++ instead of DTR to
  208.         ;   hangup.  NOTE, when using -d0 you should lock the serial port
  209.         ;   baud rate (if possible) or +++ may be unreliable as a hangup
  210.         ;   method.
  211.  
  212.         run >nil: <nil: Getty -Mh -B2400 -d0
  213.  
  214.         ;   Modify options to a Getty already running in the background
  215.  
  216.         Getty -m1           ; Set speaker on during dialing
  217.         Getty -m0           ; speaker off at all times.
  218.         Getty -0            ; kill background Getty
  219.  
  220. EXAMPLE CRONTAB ENTRIES
  221.         Assuming a getty has been run in the background from your
  222.         startup sequence, the most common desire is to disable the
  223.         modem speaker while you are asleep, and enable it at other
  224.         times.  The following crontab entry will accomplish this:
  225.  
  226. 0       23      *       *       *       getty -m0
  227. 0       11      *       *       *       getty -m1
  228.  
  229.         You can also kill (getty -0) or restart getty from your
  230.         crontab, though the prefered method is to leave it running
  231.         and only disable/enable the autoanswer (-r option) for those
  232.         times you wish your modem to not accept calls.
  233.  
  234. EXAMPLE HARDWIRED ENTRY
  235.         Lets say you have two amigas connected together via a permanent
  236.         serial line.  To run AmigaUUCP between them you want to run Getty
  237.         on one of them (NOT BOTH!).  On machine A you would run Getty
  238.         as follows:
  239.  
  240.         (Machine A):
  241.  
  242.             run >nil: <nil: Getty -B9600 -Md -h0 -c0
  243.  
  244.         The Passwd entry for the remote machine would be something like:
  245.         (Machine A)
  246.  
  247.             machb,uupc,203,0,(UUCP-NOPAS),ram:,uucico -h0 -o
  248.  
  249.         Machine B would have an L.sys entry that looks like:
  250.  
  251.             macha Any SER: 9600 "" "" \r\r\c ogin: machb sword: uupc
  252.  
  253.         In the above configuration, with Getty running on Machine A, Machine
  254.         B would run uucico (usually every X minutes from dcron) using:
  255.  
  256.             1> uucico -smacha -h0 -o -xx
  257.  
  258.         UNFORTUNATELY, with a permanent serial line you cannot run Getty
  259.         on BOTH machines.  This will cause one Getty to echo the other's
  260.         login message and vise versa, causing an infinite loop.  So only
  261.         one machine can poll.
  262.  
  263. FILES/REQUIRES
  264.         UULIB:passwd
  265.         UULIB:Getty-Header[.tty???]
  266.         UULIB:logfile
  267.  
  268.         The NULL: handler must be mounted
  269.  
  270. REFERENCES
  271.         Getty.doc
  272.         Passwd.doc
  273.