home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff247.lzh / RemoteLogin / ReadMe < prev    next >
Text File  |  1989-09-15  |  6KB  |  142 lines

  1.  
  2. SPMON and PWCHECK by Dave Kinzer
  3.  
  4.  
  5.    These are a couple of programs which make possible remote access to
  6. your Amiga.  One program checks the serial port for an incoming call, and
  7. starts a program when it is detected.  The other is a password protection
  8. program which allows starting various programs based upon login id.  This
  9. provides some (OK, call it minimal) security for your computer.
  10.  
  11.  
  12. SPMON:   (Serial port monitor)
  13.  
  14.  
  15.    The first program monitors the status of the serial port carrier
  16. detect bit.  When this bit makes a transition (indicating that the
  17. modem has just connected), the program tries to open the serial device.
  18. If the open fails, someone else is using the serial port (like a 
  19. terminal program or whatever).  In this case, the program ignores the
  20. transition and goes back to waiting for another transition.  If the
  21. open call to the serial device works, it means that no program is
  22. connected to the serial device, and it was an incoming call that
  23. caused the carrier detect to become active.  In this case, a program
  24. is executed.  This software allows any program to be run, but the
  25. best thing is probably the password program (which can spawn different
  26. programs based upon login id.)  In either case, the port monitoring
  27. program continues to run in the background, waiting for another call
  28. to come in.
  29.  
  30.    The port monitoring program is not very 'clean' in that it looks
  31. directly at the hardware.  The proper way to write this program would
  32. have it open the serial device (if not blocked by someone else), and
  33. then check the status of the carrier detect bit by checking the serial
  34. flags.  There are two reasons I decided to not do it this way.  First,
  35. it is a lot of overhead for a background program which runs every three
  36. seconds.  And second, by looking directly at the hardware the serial
  37. device is never blocked (even for a moment, you know the one, that one
  38. that you start your terminal program in.)  This provides complete
  39. transparency for you while you are working directly on your Amiga.
  40. This scheme might be difficult to implement on an expansion serial
  41. device.  The auto-config system would map the hardware in memory and
  42. you would have to go mucking around system tables to track it down.  In
  43. that case it might be easier to use the proper way to interrogate the
  44. modem status, and perhaps trade off response time to reduce the system
  45. load and probability of conflict.
  46.  
  47.    To use spmon, just run it in the background.  Give it command line
  48. to be executed when the carrier detect transition is found.  For example,
  49. to allow remote access to your Amiga without any password security, type
  50. the following:
  51.  
  52.  
  53.       run spmon "newcli AUX:"
  54.  
  55.  
  56.    When you call in to the Amiga, the modem answers and connects which 
  57. causes the carrier detect signal to become active.  Within a few seconds,
  58. a CLI message and prompt is issued.  You then can do all the commands
  59. which do not require special features (like windows, screens and arrow
  60. keys) to be run from the remote location.  When you are finished, type
  61. ENDCLI and hang up.  This will assure that you do not have the serial
  62. port tied up when you get home to your Amiga.  If you call again, a new
  63. CLI will be created.  Note that the Amiga will put up requesters if you
  64. try to write to a  write-protected disk, or try to access an off-line 
  65. volume.  This will hang your session, with no way to recover from the 
  66. remote site.  There are programs around that solve this problem, but I
  67. have not tried them yet. It would be in your best interest to check
  68. this out.
  69.  
  70.  
  71.  
  72.  
  73. PWCHECK:   (Login prompt and password checking program)
  74.  
  75.    Pwcheck is a password program to prevent unauthorised access to your
  76. Amiga.  It allows running different programs based upon login ID.  It 
  77. also allows you to have a banner message before login is accepted.  
  78.  
  79.    Pwcheck accepts one or two filenames.  The first filename is the
  80. password file name.  The format of the file is lines containing three 
  81. fields separated by colons.  The first field is the login id, the second 
  82. is the password, and the third (the rest of the line) is the command that
  83. will be executed if this the login and password match. Lines that start
  84. with a space or asterisk are ignored.
  85.  
  86.    For example:
  87. --
  88.  
  89. * Password file for my Amiga
  90.  
  91. dave:xyzzy:newshell AUX:
  92. nuucp::uucico
  93. bbs::mybbsprog
  94. bbs_sysop:oper:mybbsprog -s
  95.  
  96. --
  97.  
  98. The second file is an optional header file which is simply copied out
  99. the serial port.  An example file might be:
  100. --
  101.  
  102.       * * *    Welcome to Dave's Amiga Computer   * * *
  103.  
  104.    Please log in.  If you wish to get access to the bbs program, 
  105. at the login prompt type bbs.  There is no password.
  106.  
  107.  
  108. --
  109.  
  110.  
  111.    Now placing the following in your startup sequence file will allow you
  112. to have (fairly) secure access to your Amiga (assumes files on volume LOG:.)
  113.  
  114.    
  115.       run spmon "pwcheck LOG:pwfile LOG:bannerfile"
  116.  
  117.  
  118.    Pwcheck answers at the default speed (in other words, I did not send
  119. the serial device any change of speed information.)  There is no
  120. provision for automatically detecting the incoming baud rate.
  121.  
  122.    The pwcheck program is cleaner than the port monitoring program since
  123. it deals directly with the serial device.  To make this work with 
  124. expansion serial ports it should only be neccessary change the name of
  125. the device opened.  This could be made a command line arguement for the
  126. utmost in portability.
  127.  
  128.  
  129.    These programs are placed in the public domain by the author Dave Kinzer.
  130.  
  131.  
  132. Note:
  133.   No, I don't have a BBS program nor have I modified uucico to work with
  134. this (yet).  They are only some good examples which may stir the imagination
  135. of capable people.
  136.  
  137.  
  138.  
  139.                                      Happy Computing
  140.                                      Dave Kinzer
  141.  
  142.