home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / AGetty_exp.lha / man / AGetty.doc next >
Encoding:
Text File  |  1993-05-15  |  23.4 KB  |  500 lines

  1.  
  2.                      $VER: AGetty_Manual v0.203 (15-May-93)
  3.  
  4.                         Copyright ⌐ 1993 by Peter Simons
  5.                               All rights reserved.
  6.  
  7.  
  8.     AGetty is Freeware, meaning you may  spread  and  use  it  without  any
  9. limitations or fees. But all rights are reserved to me and I may decide  to
  10. release future versions as shareware  or  even  as  part  of  a  commercial
  11. package.
  12.  
  13.                                   WHAT IS IT?
  14.                                   -----------
  15.  
  16.     AGetty is similar to the well-known Getty  included  in  Matt  Dillon's
  17. AmigaUUCP package. It hangs on the  specified  serial  port  (serial.device
  18. unit 0 by default) waiting for connections via the connected modem. Once  a
  19. connection is detected, AGetty provides a Login: request to the caller.
  20.  
  21.     Getty disconnects any caller who  cannot  provide  a  legal  Login  and
  22. Password within 60 seconds. It also allows only  3  login  attempts  before
  23. disconnecting. Any attempt to  login  with  an  illegal  password  will  be
  24. written to the logfile.
  25.  
  26.     Upon  receiving  a  legal  Login  and  Password,   verified   via   the
  27. "PASSWD"-file, AGetty will execute a specified program, usually  UUCICO  or
  28. PMail, and stay off the line until the program returns. Then,  AGetty  will
  29. disconnect the caller and reset the modem, returning to its original state.
  30.  
  31.  
  32.               WHY SHOULD I USE THIS GETTY INSTEAD OF THE ORIGINAL?
  33.               ----------------------------------------------------
  34.  
  35.     AGetty and Getty do absolutely the same thing, so why  should  you  use
  36. this new version? The question is easy  to  answer:  Because  the  original
  37. Getty is totally outdated.
  38.  
  39. This Getty:
  40.  
  41.   - provides  the  devicelocking  machanism  supported  by  all  the  major
  42.     terminal programs such as VLT, Term, X-Comm and  Terminus,  to  name  a
  43.     few.
  44.  
  45.   - is completely localized when Workbench v2.1 is installed
  46.  
  47.   - is pure and can be made resident. This saves valuable memory on systems
  48.     serving several lines, because every AGetty-task uses the same code.
  49.  
  50.   - supports the new  features  of  OS  2.04,  like  user-friendly  command
  51.     line-help, quick-io etc...
  52.  
  53.   - is about 20kbyte smaller than the old one and needs  less  than  4kbyte
  54.     stack and only 20kbyte memory during operation.
  55.  
  56.   - draws your attention to logins rejected because an  incorrect  password
  57.     was specified.
  58.  
  59.   - has the ability to loan the used modem-port  to  another  program  that
  60.     supports the OwnDevUnit.Library.
  61.  
  62.   - recognizes incoming calls by the "RING"-message returned by  the  modem
  63.     instead  of  relying  on  the  modem-autoanswer.   This   reduces   the
  64.     probability of failed calls that used to occur when the old  Getty  was
  65.     busy while the modem made the connect. ;-)
  66.  
  67.   - allows to store login-informations (like  username  or  realname)  into
  68.     local  shell  variables,  what  is  required  by  certain  scripts   or
  69.     applications like Taylor UUCP.
  70.  
  71.   - is written by me (save the best for last)!
  72.  
  73.  
  74.                                    THE MODEM
  75.                                    ---------
  76.  
  77.     AGetty works only with hayes compatible modems,  which  understand  the
  78. AT-command set. AGetty uses locked DTR-rate and RTS/CTS-handshaking all the
  79. time. I didn't find it necessary to make this configurable, but  if  I  get
  80. some  responses  complaining  about  this,  I'll  add  a  switch   to   the
  81. config-file.
  82.  
  83.     The modem is  expected  to  return  strings  (eg.  "OK",  "ERROR",  "NO
  84. CARRIER"), not errorcodes. Modems auto-answer has to be disabled.
  85.  
  86.  
  87.                                   INSTALLATION
  88.                                   ------------
  89.  
  90.     The installation of AGetty is quiet easy: Just copy the  files  in  the
  91. "libs"-directory to your "LIBS:". (You should call "Avail  flush"  or  even
  92. better reset your amiga to make sure older versions of  the  libraries  are
  93. flushed.)  Then  copy   the   "c/AGetty"-executable   somewhere   in   your
  94. commandpath, usually "UUCP:c".
  95.  
  96.     AGetty  may  be  made  resident  using  the  shell-command  "Resident".
  97. Depending on how you extracted the AGetty  archive  you  may  have  to  set
  98. AGetty's pure bit before this will work. You  can  do  this  with  the  CLI
  99. command
  100.  
  101.         protect AGetty +p
  102.  
  103. The advantage of making AGetty resident is that AGetty is loaded once  into
  104. memory and can then be used by several tasks at the same time.
  105.  
  106.     The file "lib/AGetty.config" must be copied into a directory pointed at
  107. by a "UULIB:" assign. The other files in the "lib"-directory may be  copied
  108. anywhere (their paths are specified in the config file). Usually they go to
  109. "UULIB:", too.
  110.  
  111.     If you have Workbench v2.1 installed, copy the "catalogs"-directory  to
  112. your "LOCALE:"-assign (consult your DOS-manual for further information.) to
  113. localize   AGetty.   The   path   to   the   catalog-files    should    be:
  114. "LOCALE:catalogs/language_name/AGetty.catalog".
  115.  
  116.  
  117.                                 COMMANDLINE USAGE
  118.                                 -----------------
  119.  
  120.     AGetty recognizes several command line options, but  if  you  edit  the
  121. Config-file correctly you won't need any to start it.  (These  options  are
  122. meant for machines with more than one port, running several AGetties. Using
  123. the commandline parameters, so you can start  each  AGetty  with  it's  own
  124. options, without changing the config file every time.)  Start  AGetty  with
  125. "?" to get the following template:
  126.  
  127.      [DEVICE] [UNIT/N] [BAUD/N] [MODEMINIT] [ANSWERCOMMAND] [LOGINTEXT]
  128.        [PRI/N] [-A=ANSWER/S] [-S=SINGLERUN/S] [HARDWIRE/S] [QUIT/S]
  129.  
  130.    DEVICE - Here you can specify the device AGetty should use to "talk"  to
  131.                 the modem. This is useful for owners  of  multiport  serial
  132.                 boards which need a special version of  the  serial.device.
  133.                 If you leave this entry out, serial.device will be used  by
  134.                 default.
  135.  
  136.    UNIT/N - This is the device's unit to use. Default is unit 0.
  137.  
  138.    BAUD/N - This is the baudrate that should be used to talk to the  modem.
  139.                 You should specify the baudrate here or in the config  file
  140.                 (later) for correct functioning.
  141.  
  142.    MODEMINIT - This  is  the   string/command   that  should  be  used   to
  143.                 initialize the modem. The string must be terminated with  a
  144.                 "\r"-sequence, what means that AGetty sends the command  to
  145.                 the modem and waits for  response.  If  anything  different
  146.                 from "OK" arrives, AGetty returns with an error.
  147.  
  148.                 You may even supply whole command sequences to  the  modem,
  149.                 inserting "\r" after every single command. Example:
  150.  
  151.                         ATZ\rATS0=0\rATX7\r
  152.  
  153.                 IMPORTANT: AGetty  uses  its  own  method  to  determine  a
  154.                 caller, so you have to  disable  the  modem's  auto  answer
  155.                 (ATS0=0). Otherwise AGetty won't work correctly.
  156.  
  157.    ANSWERCOMMAND - Here you can supply a commandstring that should be  used
  158.                 to answer the incomming call. In spite of  MODEMINIT,  this
  159.                 entry doesn't support and though doesn't need to be  closed
  160.                 with a "\r", AGetty appends the return himself.
  161.  
  162.                 The default command is "ATA".
  163.  
  164.    LOGINTEXT - Here you can specify a textfile that should be displayed  to
  165.                 every caller. This is  somewhat  useless  for  UUCP  sites,
  166.                 because programs like UUCico or PMail don't care much about
  167.                 this "welcome text". However, a human caller may  get  your
  168.                 number accidently and you want  to  inform  him  that  here
  169.                 isn't anything interesting available.
  170.  
  171.    PRI/N - Using this parameter you may change the  priority  AGetty   will
  172.                 run at. Usually you should choose a priority above  0,  but
  173.                 not higher than 5. Let's say about 4, okay? :-) The default
  174.                 value is 0.
  175.  
  176.    -A=ANSWER/S - If you  add  this  keyword  to  the  commandline,   AGetty
  177.                 answers to an existent or  non-existent  caller  immediatly
  178.                 without checking for a "RING" message from the modem.  This
  179.                 switch is useful for sites that do not run 24h a  day,  but
  180.                 rather only for exchanging some programs at  special  times
  181.                 (like mine).
  182.  
  183.                 One example: You talk to a friend of yours  who  tells  you
  184.                 something about a program he found on a bbs a  few  minutes
  185.                 ago. You both have your modem and phone  connected  to  the
  186.                 same line. Just execute  "AGetty  -A"  and  he  starts  his
  187.                 UUCICO/PMail using "ATD" as his dialstring and now you  can
  188.                 exchange the archive  without  calling  each  other  again.
  189.                 After the mailers have transferred the archive you may even
  190.                 go voice again.
  191.  
  192.    -S=SINGLERUN/S - This switch must be used together  with  ANSWER  or  it
  193.                 will have no  effect.  If  you  specify  SINGLERUN,  AGetty
  194.                 returns immediatly after processing one connection.
  195.  
  196.    HARDWIRE/S - Using this switch you can tell AGetty  that  this  port  is
  197.                 connected to another machine using a nullmodem. This  means
  198.                 that AGetty won't send any  modem  commands  and  does  not
  199.                 expect a carrier on that line.
  200.  
  201.                 ATTENTION: This feature is untested! If you need it, supply
  202.                 me with a second Amiga! :->
  203.  
  204.    QUIT/S - If you add this keyword to the commandline,  AGetty  will  look
  205.                 for an AGetty beeing on job for this line and  will  signal
  206.                 him  to  quit.  This  AGetty  will  terminate  as  soon  as
  207.                 possible, but will complete any running login before. If no
  208.                 AGetty for this device and unit is  working,  nothing  will
  209.                 happen.
  210.  
  211.                 Another way to terminate AGetty is to  send  him  a  CTRL/D
  212.                 break.
  213.  
  214.  
  215.                                 CONFIGURATION
  216.                                 -------------
  217.  
  218.     Let's begin with the easiest part of the configuration: Load  the  file
  219. "lib/Getty-Header" into your favourite editor and write a nice message that
  220. will be displayed to any (human)  caller.  (Of  course,  you  may  keep  my
  221. message but then the shareware fee rises. :->)
  222.  
  223.     That was easy, wasn't it? :-)) Now take a look at  "lib/AGetty.config".
  224. In most cases you can keep the actual value/string for  correct  functions.
  225. Keywords are recognized only when  they're  placed  in  the  first  column.
  226. Comment lines must begin with a '#' or ';'. Comments after  a  keyword  are
  227. not allowed. The parameter may contain spaces, but it may not  end  with  a
  228. space. Leading and trailing blanks are  not  parsed  by  AGetty.  (Example:
  229. "SYSTEMNAME peti is the best"  is  okay,  but  "SYSTEMNAME  AGetty  is  the
  230. coolest tool under the sun " won't be parsed correctly.)
  231.  
  232. Here's a description of all keywords known to AGetty:
  233.  
  234.    STANDARDDEVICE - This is the device that AGetty should use  as  default.
  235.                 This selection is overridden by the command  line.  Default
  236.                 is serial.device.
  237.  
  238.    STANDARDBAUD - Baud rate to talk to the  modem  at.  Overridden  by  the
  239.                 command line. This entry must  be  specified!!  No  default
  240.                 value is provided.
  241.  
  242.    MODEMINIT - The string to initialize the modem. For a  brief  descrption
  243.                 of how to  provide  modem  commands,  please  look  at  the
  244.                 corresponding  entry  in  the  commandline  sction  of  the
  245.                 manual.
  246.  
  247.                 IMPORTANT: AGetty uses its own method to detect calls!  You
  248.                 MUST have auto answer disabled (ATS0=0).
  249.  
  250.    BRUTEFORCE - "yes" or "no" may follow. This entry decides whether AGetty
  251.                 should wait for the device to become free or should  return
  252.                 with an error after  5  seconds.  Be  careful  with  "yes":
  253.                 AGetty won't return before the device is freed and can  not
  254.                 be interrupted with CTRL/C.
  255.  
  256.    IMMEDIATEANSWER - AGetty doesn't use the auto-answer mode of  the  modem
  257.                 but his own system of recognizing incomming calls.  Do  you
  258.                 want to AGetty to answer the phone immediatly or would  you
  259.                 prefer him waiting for the second ring? The latter  reduces
  260.                 the chance of AGetty answering the phone unnecessarily.
  261.  
  262.    ANSWERCOMMAND - Here you can provide the  default  modem  command,  that
  263.                 should be used to answer incomming calls. This selection is
  264.                 overridden by the command line. Default is "ATA".
  265.  
  266.    MYPRI - Here you can specify the prioritity you want AGetty to  run  at.
  267.                 This is overridden by the command line. Default is 0.
  268.  
  269.    LOGFILE - Here you can specify path and name of  your  logfile.  If  you
  270.                 comment this entry out, AGetty won't log its activities  to
  271.                 a file.
  272.  
  273.    LOGINTEXT - Here you can specify the path and name of  the  (text)  file
  274.                 that should be displayed to callers. This is overridden  by
  275.                 the command line.
  276.  
  277.    PASSWD - Here you can specify the name and path of  your  password  file
  278.                 (described  later.).  This  entry  must  be  specified.  No
  279.                 default is provided.
  280.  
  281.    USER          - For some programs is may be useful if  some  information
  282.    PASSWORD        (like the login-name or realname) would be available  in
  283.    USERID          scripts  via  DOS-variables.  Each  of  these   keywords
  284.    GROUPID         represents a corresponding entry in  the  passwdfile  of
  285.    FINGER-INFO     the actual caller. Behind these keywords you may specify
  286.    HOME-DIR        the name of the variable to hold the information of  the
  287.    COMMAND-TO-RUN  passwdfile.
  288.  
  289.                    The datas are  stored  in  local  DOS-variables,  please
  290.                    consult your DOS-manual for further  information.  These
  291.                    variables are set before  the  command  is  executed  by
  292.                    AGetty and are deleted afterwards. The  former  contents
  293.                    are not rescued!
  294.  
  295.  
  296.                                 SETTING UP A SITE
  297.                                 -----------------
  298.  
  299.     Okay, your AGetty is configured now, but how does it know  what  to  do
  300. when somebody wants to login?? This information is found in  the  "Passwd"-
  301. file usually found in "GETTY:" or "UULIB:". For each system you have to add
  302. a line to this file using the following syntax:
  303.  
  304.    User,Password,UserID,GroupID,(Finger-Info),Home-Dir,Command-To-Run
  305.  
  306. The fields are seperated with commas ',' and may contain blanks.
  307.  
  308.    User - this is the login-name of this guy. As described  later  in  this
  309.                 section, the login-name of somebody needn't necessarily  be
  310.                 the same as his systemname. The username is limitied up to
  311.                 32 characters.
  312.  
  313.    Password - this is the password used for that login (not case sensitive)
  314.                 The password is limited up to 32 chars, too.
  315.  
  316.                 If you specify a single  star  ("*")  as  password,  AGetty
  317.                 won't ask  the  user  for  the  password  but  execute  the
  318.                 CommandToRun immediatly. This feature is useful  for  sites
  319.                 that run UUCP and a BBS at one port. Then the caller  could
  320.                 log in with "BBS" or something similar and doesn't have  to
  321.                 provide a password.
  322.  
  323.    UserID - this field isn't used in this version of  AGetty,  but  has  to
  324.                 exist.
  325.  
  326.    GroupID - this field isn't used in this version of AGetty,  but  has  to
  327.                 exist.
  328.  
  329.    Finger-Info - this field isn't used in this version of AGetty,  but  has
  330.                 to exist.
  331.  
  332.    Home-Dir - Here you can provide an AmigaDOS directory-name. AGetty  will
  333.                 make this directory the current one, before he executes the
  334.                 specified command. This may be  important  for  some  tools
  335.                 like AXShell. If no home directory is provided, "UUCP:"  is
  336.                 used as default.
  337.  
  338.    Command-To-Run - this is the command that should  be  started  when  the
  339.                 user/machine has logged in successfully.
  340.  
  341.                 NOTE: The old Getty had an option allowing to  preface  the
  342.                 command-to-run with a star ("*"). If Getty found  this,  he
  343.                 redirected the standard i/o of the program  to  the  serial
  344.                 device. This is not supported  by  AGetty  in  the  current
  345.                 revision, but might be added in the near future.
  346.  
  347. Some examples:
  348.  
  349. quax,peti for president,,,,,UUCPC:PMail quax
  350. quax_uucico,peti for president,,,,UUSpool:,UUCPC:UUCico <NULL: >NULL: -USER quax
  351. quax_8k,yeah_yeah,,,(Thomas Mildenberger),,UUCPC:PMail quax -XPRLIB xprzmodem8k.library
  352.  
  353.     All entries are for the same person or machine, but  depending  on  the
  354. login name different commands are called.  Programs  like  PMail  or  later
  355. versions of UUCico allow one to specify the machine name of the  caller  in
  356. the commandline, so you may have different  logins  but  only  one  machine
  357. name.
  358.  
  359.     You can interrupt the actual login-attempt by sending a CTRL-C break to
  360. AGetty.
  361.  
  362.  
  363.                              LOG- AND ERROR-MESSAGES
  364.                              -----------------------
  365.  
  366.     Let's say, you installed  AGetty  propperly,  edited  the  config-  and
  367. passwd-file, but it still doesn't do what you whant. What could you  do  to
  368. locate the error?
  369.  
  370.     AGetty supplies you with a lot of log- and error messages, if you  have
  371. Workbench v2.1 installed even  in  your  native  language.  These  messages
  372. should tell you anything you need to get rid of the bug. Here's a  list  of
  373. all messages AGetty could possibly display with a short description:
  374.  
  375.    "Failed allocating a SignalBit!" -  AGetty  failed  allocating  an  user
  376.                 signalbit. Perhaps a program in your  system  doesn't  free
  377.                 its allocated signalbits correctly? You'll  have  to  reset
  378.                 your machine...
  379.  
  380.    "There's already an AGetty running for that port!"  -  exactly  what  it
  381.                 says. :-)
  382.  
  383.    "Carrier lost!" - A carrier detected has been expected  but  no  carrier
  384.                 was found. If this happens  in  a  7wire-connection  you'll
  385.                 have to start AGetty with the -7WIRE switch.
  386.  
  387.    "Received CTRL/C-Break!" - You can interrupt the  current  login,  modem
  388.                 command or whatever AGetty is  doing  at  the  moment  with
  389.                 CTRL/C.
  390.  
  391.    "Borrowed %s, unit %lu to  >%s<"  -  When  an  other  program  tries  to
  392.                 allocate the serial.device  using  the  OwnDevUnit.Library,
  393.                 AGetty will be notified. If  he  doesn't  need  the  device
  394.                 himself at the moment (for an incomming call),  he'll  free
  395.                 the device for the other task and wait for it to return.
  396.  
  397.    "Got %s, unit %lu back" - The other program has freed the device again.
  398.  
  399.    "Connect on unit %lu failed!" - connect failure
  400.  
  401.    "Couldn't hang up!" - I invested *VERY* much time  in  AGetty's  hang-up
  402.                 mechanism. When AGetty tries to hang up, it sends a carrige
  403.                 return to  the  modem  to  interrupt  still  working  modem
  404.                 commands like "ATA". After a short delay the status of  the
  405.                 carrier is checked. Is a carrier detected, AGetty  sends  a
  406.                 "+++" to go into command mode. Then "ATH"  is  transmitted.
  407.                 After a delay of 2 seconds AGetty checks the carrier again.
  408.                 If the carrier is still detected, AGetty drops the  DTR  to
  409.                 force the modem to hang up.
  410.  
  411.                 And if this doesn't have any effect, the above  message  is
  412.                 displayed.
  413.  
  414.    "%s logged into command %s" - A system logged in  successfully  and  the
  415.                 listed command has been executed.
  416.  
  417.    "Login failed! login: %s, password: %s" - Someone tried to log  in,  but
  418.                 couldn't supply a correct login name  or  password.  AGetty
  419.                 asks the caller for login and password, even if  the  login
  420.                 has already been incorrect. This  makes  it  impossible  to
  421.                 hackers to find out wether the users exists or not.
  422.  
  423.                 The incorrect data are listed here, for your information.
  424.  
  425.    "Modem-initialisation failed!" - The Modem returned something  different
  426.                 than  "OK"  during  the  modem-initialisation,   maybe   an
  427.                 "ERROR"?
  428.  
  429.                 Don't worry too much about this error. Most programs I know
  430.                 do not even try to check wether the  command  was  executed
  431.                 corretly, because it is nearly impossible to interpret  the
  432.                 strings returned by the modem. Every modem handles  certain
  433.                 situations differntly, just one example: I send  the  modem
  434.                 an "ATZ".  During  the  execution,  the  modem  detects  an
  435.                 incomming call. Some modems will interrupt the command  and
  436.                 return nothing except the "RING". Other modems will  report
  437.                 the "RING" and then finish the command with "OK", etc...
  438.  
  439.  
  440.                                  FUTURE RELEASES
  441.                                  ---------------
  442.  
  443.     There's still some work to do for the comming releases of  AGetty.  The
  444. next feature that will be added is fax  support  and  to  rewrite  AGetty's
  445. manual for AmigaGuide, providing cross-references and similar stuff.
  446.  
  447.     Then I'll try to add support for AxShell and similar programs,  meaning
  448. that I add the fido capabilities of Matt's Getty: If the command-to-run  is
  449. prefaced with a star ("*"), the Getty provides the  serial  in-/output  via
  450. STDIN/STDOUT.
  451.  
  452.     Additionally, I'd like to add more security to AGetty, regarding  local
  453. networks and multi-user systems. I'm currently working on a nice encryption
  454. feature, what will provide ultimate security for the passwd-file.  This  is
  455. commonly used under UNIX, but quiete unknown on the amiga.
  456.  
  457.     One of the easier additions should be  a  routine  that  handles  human
  458. logins better, meaning that AGetty echos the typed characters at the  login
  459. and filters illegal control-characters.
  460.  
  461.     How fast these updates will be  released,  depends  on  the  amount  of
  462. feedback I receive.
  463.  
  464.  
  465.                                SYSTEM REQUIREMENTS
  466.                                -------------------
  467.  
  468.     AGetty requires  Kickstart  v37  (Workbench  Release  2.0)  or  higher.
  469. Additionally, PTool.Library and OwnDevUnit.Library are required.
  470.  
  471.  
  472.                                 HOW TO CONTACT ME
  473.                                 -----------------
  474.  
  475.     If you want to contact me (e-mail preferred), you may use the following
  476. addresses:
  477.  
  478.     Snail-Mail: Peter Simons        E-Mail: simons@peti.GUN.de (Usenet)
  479.                 Europaring 20
  480.                 D-5300 Bonn 1        Voice: +49 228 746061
  481.                 Germany
  482.  
  483.  
  484.                                 ACKNOWLEDGEMENTS
  485.                                 ----------------
  486.  
  487.     First of all, I'd like to appreciate the  work  of  Stefan  Thielscher,
  488. Frank Bergknecht and Thomas Mildenberger  who  helped  me  betatesting  the
  489. program. Also very important were Christopher A. Wichura  and  Mike  Meyer,
  490. who contributed many fine ideas for AGetties improvement and  compatibility
  491. to the whole UUCP-package.
  492.  
  493.     Then I'd like to thank all the guys who installed and used AGetty for a
  494. period of time, reporting me any  error  that  occured  and  helped  me  to
  495. terminate these bugs.
  496.  
  497.     And my (famous) last words belong to Marcus Kuba and Matthias Zepf,  my
  498. all-time favorite fans and supporters.
  499.  
  500.