home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / PSWD21.ZIP / PASSWORD.DOC < prev    next >
Encoding:
Text File  |  1991-01-13  |  9.2 KB  |  238 lines

  1.  
  2.  
  3. Password.exe (PSWD20.ZIP)  Version 2.1  Released 1/15/1991
  4.  
  5.  
  6.                 Copyright 1990 by Arnold R. McGall Jr.
  7.  
  8.                 All rights reserved.  You are free to use this program
  9.                 and to distribute it at NO COST, unchanged, to anyone.
  10.                 You are not to sell this program or to include this
  11.                 program with a software package you intend to sell or
  12.                 otherwise distribute to a thrid party.
  13.  
  14.                 I disclaim any responsibility for anything as a
  15.                 consequence of using this program.
  16.  
  17.                 I will make the Pascal source code available to anyone
  18.                 for a fee of $25.00 and a signed non-disclosure agreement.
  19.  
  20.  
  21. Password.exe provides a simple method of installing password protection to
  22. any DOS or PC-MOS system.  Users are assigned a user ID and a password.
  23. The user ID and the password may each contain a maximum of 35 characters.
  24. For simplicity sake I would suggest you limit the user ID and password to
  25. no more than eight or ten characters each.
  26.  
  27. The assigned user ID and password are stored in a file you create with any
  28. ASCII text editor named  PWD.DAT
  29.  
  30. The User ID and password for each user is stored on one line in the PWD.DAT
  31. file using the following format:
  32.  
  33.                 USERID/PASSWORD
  34.                 ARNIE/PASSWORD
  35.                 MARY/283ERLK
  36.                 ARM817234/KQ1299#LL1
  37.  
  38. Please note that there are is only one MUST when entering the user ID and
  39. password data into this file.
  40.  
  41.        You must separate the user ID from the password with a forward
  42.        slash just as shown in the above example.
  43.  
  44. When password is executed it will prompt the user to input a user ID.
  45. Then the user is prompted to enter their password.  User ID and password
  46. may be entered by the user in either upper or lower case.  If they match the
  47. user's record in the pwd.dat file, the password program will display
  48. a message "User Logon Completed" and exit to DOS with a errorlevel
  49. code of 0.  Also, a batch file named tmp.bat will be created in the default
  50. directory.  The tmp.bat file contains one line:  SET USER=xxxxxxxx (where
  51. xxxxxxxx = the user ID of the logged in user.)  Use command line parameter
  52. /B to turn the tmp.bat batch file creation function ON.  Default is NO
  53. tmp.bat batch file created.
  54.  
  55. If no match is found the program will give the user another
  56. chance to enter the correct user ID and password.  A maximum of four
  57. tries is allowed.  After the fourth unsuccessful attemp the program exits
  58. to DOS with a errorlevel code of 1.
  59.  
  60. The errorlevel codes which password issues can be used with batch files
  61. or other user written programs to make a decision on where to send the
  62. user if logon succeeds or if logon fails.  An example batch file follows:
  63.  
  64.  
  65.  
  66.  
  67. REM  signon.bat  signon batch file
  68. REM  Use @ in front of echo off if DOS 3.2 or higher
  69.  
  70. echo off                            <----  Turn echoing of batch file
  71.                                            commands off.
  72. break off                           <----  Prevent CTRL-break so user can't
  73.                                            break out of password program.
  74. :start
  75. password.exe /B                     <----  Execute password.exe program.
  76. if not errorlevel 0 goto start      <----  If logon not successful goto start.
  77. tmp.bat                             <----  Run the tmp.bat file to put
  78.                                            user ID into environment.
  79.  
  80. del tmp.bat                         <----  Delete the tmp.bat file.
  81.  
  82. break on                            <----  Logon OK allow CTRL-break.
  83. echo on                             <----  Turn echoing back on.
  84. userMenu.exe                        <----  Execute a menu program.
  85. break off                           <----  Prevent CTRL-break.
  86. echo off                            <----  Turn echoing off
  87. goto start                          <----  Go back to start.
  88.  
  89.  
  90.  
  91. Since the pwd.dat file is NOT encrypted, I would suggest that, at the
  92. very least, you make it a hidden file.  Make sure you create the PWD.DAT
  93. file before running password.exe since the program does not check for
  94. the existence of the file.
  95.  
  96. Command Line Switches:
  97.  
  98. /x  ....  Where is the number of maximum logon tries allowed (1 to 9).
  99.  
  100. To set the maximum number of logon tries enter a number from 1 to 9
  101. as a command line switch.    i.e.  /6/N/B
  102.  
  103. /N  ....  No message displayed upon successful logon.
  104.  
  105. If the command line parameter switch /N is entered when password is
  106. executed, the "User Logon Complete" message will be surpressed.
  107.  
  108. /B  ....  Create TMP.BAT file for placing user ID in environment.
  109.  
  110. If /B is entered the program will create a batch file TMP.BAT which
  111. conatins command to put user ID into environment.
  112.  
  113. /T  ....  Display User ID and time/date of logon upon succesful logon.
  114.  
  115. /E  ....  Enable password program to read ENCRYPTED PWD.DAT file.  Default
  116.           is program will NOT de-encrypt PWD.DAT file and expects to
  117.           read ASCII characters in the text file.
  118.  
  119.  
  120. If no command line switches are entered the program defaults are:
  121.  
  122.         1.  "User Logon Complete" IS displayed.
  123.         2.  NO TMP.BAT file is created.
  124.         3.  Maximum logon tries is limited to four.
  125.         4.  NO display of User ID and date/time of logon.
  126.  
  127. The following are some examples of command switches:
  128.  
  129.             password /6          <------- Limits user to six logon attempts
  130.                                           before program exits with DOS
  131.                                           errorlevel set to 1.
  132.  
  133.             password /N          <------- Results in NO message displayed
  134.                                           upon succesfull logon.
  135.  
  136.             password             <------- Results in "User Logon Complete"
  137.                                           displayed, no TMP.BAT file
  138.                                           creation upon successful logon.
  139.                                           Default number of logon attempts
  140.                                           permitted is default of four.
  141.  
  142.             password /B          <------- TMP.BAT file will be created upon
  143.                                           successful logon.
  144.  
  145.             password /E          <------- Turns on de-encryption mode so
  146.                                           the password program can read
  147.                                           an encrypted PWD.DAT file.
  148.  
  149.             password /T          <------- Upon successful logon the message
  150.                                           "USER ID Logged On DOW, Month Day,
  151.                                           Year  HH:MM" is displayed.
  152.  
  153.             password /N/B        <------- No logon message displayed and
  154.                                           TMP.BAT batch file is created.
  155.  
  156.         password /6/N/B/T/E      <------- Limits user to six logon attempts.
  157.                                           No logon message is displayed,
  158.                                           TMP.BAT file is created, the
  159.                                           User ID, date and time is displayed,
  160.                                           and de-encryption is turned ON to
  161.                                           allow password program to de-encrypt
  162.                                           the PWD.DAT file.
  163.  
  164. Use with LOGON.EXE:
  165.  
  166. You may want to use password.exe with my other program logon.exe.  Logon.exe
  167. looks into the environment for the user ID string and appends a logon audit
  168. file with userid, current date and time of logon.  Logoff.exe appends a logon
  169. audit file with user ID and time/date user logged off.
  170.  
  171.  
  172. Corrections/additions since version 1.0:
  173.  
  174. Version 1.10
  175.  
  176.         1.  Corrected misspelled word logon in "User Logon Complete".
  177.  
  178.         2.  Added command line parameter switch /N capability to
  179.             surpress screen messages upon successful logon.
  180.  
  181. Version 1.11
  182.  
  183.         1.  Added capability for program to create a batch file named
  184.             tmp.bat which contains command to put user ID into the
  185.             environment.
  186.  
  187.         2.  Added command line parameter switch /B to tell password.exe
  188.             to create tmp.bat batch file.
  189.  
  190. Version 1.12
  191.  
  192.         1.  Corrected problem with command line paramter parseing.
  193.  
  194. Version 1.13
  195.  
  196.         1.  Minor inline changes.
  197.  
  198. Version 1.14
  199.  
  200.         1.  Added command line switch to set maximum number of logon
  201.             tries will be allowed before program exits with DOS errorlevel
  202.             1 code.
  203.  
  204. Version 1.15
  205.  
  206.         1.  Added code to display User ID date and time when logon is
  207.             successful.  This option is enabled by command switch /T.
  208.  
  209. Version 2.0
  210.  
  211.         1.  Added routine to allow program to read encrypted form of PWD.DAT
  212.             file is command line paramter /E is set.
  213.  
  214. Version 2.1
  215.  
  216.         1.  Fixed bug in command line parameter parser.
  217.  
  218.  
  219.  
  220.  
  221.  
  222. WARNING!!!!
  223.       This password program DOES NOT prevent a user from re-booting the
  224.       system with a floppy disk.  Maybe a future version will provide a
  225.       utility which will inhibit booting from a floppy disk (dangerous).
  226.  
  227.  
  228. I may be contacted via e-mail on:
  229.  
  230. GEnie:                A.McGall
  231. MCI:                  A.McGall
  232. Prodigy:              BMPK99A
  233. Rusty & Eadie's BBS:  Arnie McGall
  234.  
  235.  
  236.  
  237.  
  238.