home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2290 / README < prev    next >
Encoding:
Text File  |  1990-12-28  |  12.0 KB  |  317 lines

  1. This is the explanatory document for John F. Haugh II's login replacement.
  2. This document is for version 2, last modified on 11/26/90.
  3.  
  4. This software is copyright 1988, 1989, 1990, John F. Haugh II.  All rights
  5. reserved.  Use, duplication and disclosure is permitted according to the
  6. guidelines listed below.
  7.  
  8. This software is being provided as a freely redistributable login clone.
  9. You may distribute this software provided you do not charge for other than
  10. transmission costs.  You are free to copy this software provided you
  11. do not restrict the rights of the recipients to further copy this software.
  12.  
  13. THIS SOFTWARE IS BEING DISTRIBUTED AS-IS.  THE AUTHORS DISCLAIM ALL
  14. LIABILITY FOR ANY CONSEQUENCES OF USE.  THE USER IS SOLELY RESPONSIBLE
  15. FOR THE MAINTENANCE OF THIS SOFTWARE PACKAGE.  THE AUTHORS ARE UNDER NO
  16. OBLIGATION TO PROVIDE MODIFICATIONS OR IMPROVEMENTS.  THE USER IS
  17. ENCOURAGE TO TAKE ANY AND ALL STEPS NEEDED TO PROTECT AGAINST ACCIDENTAL
  18. LOSE OF INFORMATION OR MACHINE RESOURCES.
  19.  
  20. Special thanks are due to Chip Rosenthal for his fine testing efforts;
  21. to Steve Simmons for his work in porting this code to BSD; and to Bill
  22. Kennedy for his contributions of LaserJet printer time and energies.
  23.  
  24. Begin by reading and editing the config.h file.  All options are selected
  25. by using #define's.  A brief description for each available option appears
  26. below.  You may want to print this file out as it is LONG and you will
  27. need to refer to it while editting config.h.  You will also have to edit
  28. the Makefile.  The possible differences are documented there.  Pay close
  29. attention to the install: rule.  DO NOT MAIL ME DIFFERENCES FOR VARIOUS
  30. INSTALLATION PROBLEMS.  If you must share your experiences, do so on the
  31. net.  Login now runs on about 30 different varieties of UNIX that I have
  32. been made aware of.
  33.  
  34. Note that there are MANY options.  As distributed most options are turned
  35. on, which produces a really nice package.  This is the system as used on
  36. the authors' machines.
  37.  
  38. Dialup Password Files -
  39.     This option permits individual ports to have an additional
  40.     password prompted for on a by-shell basis.  /etc/dialups
  41.     contains a list of dialup ports, d_passwd contains the
  42.     password for each shell requiring a dialup password.
  43.  
  44.     Select this option by defining the DIALUP macro.
  45.  
  46. Port Access Times File -
  47.     This option permits individual ports to have restrictions
  48.     based on user name and time of day and week.
  49.  
  50.     Select this option by defining the PORTTIME macro.
  51.  
  52. Shadow [ unreadable ] Password Files -
  53.     This option utilizes an alternate, non-readable file to
  54.     contain the actual encrypted passwords.  This is presumed
  55.     to increase system security by increasing the difficulty
  56.     with which system crackers obtain encrypted passwords.
  57.  
  58.     Select this option by defining the SHADOWPWD macro.
  59.  
  60. DBM Password Files -
  61.     This option utilizes the DBM database access routines to
  62.     increase the performance of user name and ID lookups in the
  63.     password file.
  64.  
  65.     Select this option by defining both the DBM and GETPWENT
  66.     macros.  The FGETPWENT macro must also be defined or the
  67.     fgetpwent() library routine must be present.
  68.  
  69. Double Length Passwords -
  70.     This option extends the maximum length of a user password
  71.     to 16 characters from eight.
  72.  
  73.     Select this option by defining the DOUBLESIZE macro.
  74.     Credit for this option is due Jonathan Bayer.
  75.  
  76. Obscure Password Testing -
  77.     This option includes code to test user passwords for
  78.     complexity.  The programmer is encouraged to edit the
  79.     file obscure.c to add additional methods for detecting
  80.     simplistic passwords.
  81.  
  82.     Select this option by defining the OBSCURE macro.
  83.  
  84.     Additionally, the PASSLENGTH macro must be defined to
  85.     control the minimum length for a legal password.
  86.  
  87. Mandatory Password Prompting -
  88.     This option requires all passwords, including null ones,
  89.     to be prompted for.  Traditionally an account with a
  90.     password field of '::' does not require prompting for.
  91.     This option modifies this behavior to require even
  92.     null passwords be prompted for.
  93.  
  94.     Select this option by defining the NOBLANK macro.
  95.  
  96. Password Aging Defaults -
  97.     You may select the default number of days during which a
  98.     password is valid.  The pwconv command adds aging
  99.     information to accounts which do not include it already.
  100.  
  101.     The MINDAYS macro must be defined to be the minimum
  102.     number of days which must pass before a password may be
  103.     changed.  The MAXDAYS macro must be defined to be the
  104.     maximum number of days which a password will remain
  105.     valid during.
  106.  
  107.     The WARNDAYS macro controls how many days warning a user
  108.     is given that their password is about to expire.  The
  109.     default is 10.
  110.  
  111. HZ Environmental Variable -
  112.     This option pre-defines the HZ environmental variable.
  113.     Certain systems require this variable be defined for
  114.     system time reporting functions to work properly.
  115.  
  116.     Select this option by defining the HZ macro to have
  117.     the desired environmental variable value.
  118.  
  119. TZ Environmental Variable -
  120.     This option pre-defines the TZ environmental variable.
  121.     This provides a default timezone variable for use by
  122.     various utilities.
  123.  
  124.     Select this option by defining the TZ macro to have
  125.     the desired environmental variable value, or the name
  126.     of the file containing the desired value.
  127.  
  128. Password Aging -
  129.     This option includes code to perform password aging.
  130.     Password aging is presumed to increase system security
  131.     by forcing users to change passwords on a regular
  132.     basis.  The resolution on password age is in weeks for
  133.     non-shadow password systems and in days otherwise.
  134.  
  135.     Select this option by defining the AGING macro.
  136.  
  137. Mailbox Checking -
  138.     This option includes code to check the status of the
  139.     user's mailbox.  One of three messages are produced
  140.     depending on the status of the user's mailbox.
  141.  
  142.     Select this option by defining the MAILCHECK macro.
  143.  
  144. Console Restricted Root Logins -
  145.     This option restricts the port which root may legally
  146.     login on.  This option presumably increases system
  147.     security by preventing outside attacks against the root
  148.     account.
  149.  
  150.     Select this option by defining the CONSOLE macro to
  151.     have the desired port name.  If this file is a regular
  152.     file, it is considered to contain a list of legal port
  153.     names, one per line.  Note that the port names DO NOT
  154.     begin with "/dev/" and that a file name would have to
  155.     be fully qualified.  See config.h for a pair of
  156.     examples.
  157.  
  158. Restricted User Logins -
  159.     This option permits you to specify a file which disables
  160.     user logins.  This options permits you to keep normal
  161.     users off of the system while performing maintenance
  162.     functions.
  163.  
  164.     Select this option by defining NOLOGINS to be the name
  165.     of the file to use.
  166.  
  167. Restricted Use Accounts -
  168.     This option permits certain accounts to be used for
  169.     identification purposes only.  This options associates
  170.     login ID's with UID's, such as for disk space accounting
  171.     or anonymous FTP accounts.  Passwords for these accounts
  172.     may only be changed by root.
  173.  
  174.     Select this option by defining NOUSE to be the string
  175.     to include in the password file in place of the user's
  176.     shell.
  177.  
  178. Message of the Day Printing -
  179.     This option causes the message of the day to be
  180.     printed at login time.
  181.  
  182.     Select this option by defining the MOTD macro.
  183.  
  184.     If you wish this feature to be overriden on a per-user
  185.     basis, define the macro HUSHLOGIN and users may then
  186.     turn off the /etc/motd message by creating a file
  187.     '.hushlogin' in their home directories.
  188.  
  189. Last Login Time Logging -
  190.     This option causes a record to be made of successful
  191.     logins in /usr/adm/lastlog.  The format of the
  192.     structure is defined in lastlog.h.
  193.  
  194.     Select this option by defining the LASTLOG macro.
  195.  
  196.     You will need to determine if you system already has
  197.     a lastlog.h file and use that file if present.
  198.  
  199. Failed Login Logging -
  200.     This option causes a record to be kept of the most
  201.     recent login failure by date and port.  A cummulative
  202.     count of failures is maintained and compared against
  203.     an allowable limit.
  204.  
  205.     Select this option by defining the FAILLOG macro.
  206.  
  207.     An additional option is provided which will create
  208.     utmp-like entries for each failed login.  Because of
  209.     security concerns, only valid account names will be
  210.     logged.
  211.  
  212.     Select this option by defining the FTMP macro to be
  213.     the name of a utmp-like file.  You may control the
  214.     recording of unknown login names by defining the
  215.     UNKNOWNS macro.  This prevents possible passwords from
  216.     being entered into the FTMP file.
  217.  
  218.     See the file faillog.h and config.h for more details.
  219.  
  220. Terminal Permissions - 
  221.     This option allows the terminal modes to be set at
  222.     login time.  This is particularly useful to disable
  223.     messages on user's terminals.
  224.  
  225.     Select this option by defining the TTYPERM macro as
  226.     having the desired mode.
  227.  
  228. Terminal Type Setup -
  229.     This option allows the terminal type to be set at
  230.     login time.  The environmental variable TERM will be
  231.     set from the specified terminal to port mapping
  232.     file.
  233.  
  234.     Select this option by defining the TTYTYPE macro as
  235.     having the value of the name of the type to port
  236.     mapping file.  Credit for this option is due Chip
  237.     Rosenthal.
  238.  
  239. File Size Setting -
  240.     This option includes code to set the user's ulimit
  241.     at login time.  Additional code to set the umask and
  242.     nice value is also included.
  243.  
  244.     Select this option by defining the QUOTAS macro.
  245.  
  246. Switch-User Logging -
  247.     This option causes su(1) to log attempts to switch
  248.     users.  Su(1) will log all attempt, giving the old
  249.     and new user ID's, tty port, and time.  It also
  250.     indicates if the attempt was successful.
  251.  
  252.     Select this option by defining the SULOG macro to
  253.     have the value of the name of the file you want
  254.     attempts logged to.
  255.  
  256. Configurable Editing Keys -
  257.     This options allows the erase and kill characters to
  258.     be selected.  A default value is provided.  By default
  259.     ERASE will be ^H and KILL will be ^U.
  260.  
  261.     Select this option by defining the ERASECHAR macro
  262.     to be the desired erase character and the KILLCHAR 
  263.     macro to be the desired KILL character.
  264.  
  265. Default ulimit and umask Values -
  266.     This option allows you to select the default values
  267.     for ulimit and umask, allowing you to avoid
  268.     regenerating your system kernel.  These values may be
  269.     overriden with appropriate entries in the GECOS field.
  270.  
  271.     Select the default ulimit by defining the ULIMIT
  272.     macro, and the default umask by defining the UMASK
  273.     macro.
  274.     
  275.     Warning: These values will not apply to processes
  276.     executed by /etc/cron or any of their children.
  277.  
  278. BSD Notes:    Steve Simmons    scs@iti.org
  279.  
  280. The full port of the shadow package to BSD is not complete; but some
  281. of the issues have been worked out.  These notes describe the current
  282. state of things:
  283.  
  284. In order to make use of password aging under BSD, minor changes to
  285. /usr/include/pwd.h and getpwent() are needed.  These changes are to
  286. keep the password age from messing up the encrypted password when not
  287. using shadow passwords, and involve placing a new field in the password
  288. data structure.  To use this, you should apply the following two patches:
  289.     pwd.h.patch
  290.     getpwent.c.patch
  291. to the BSD /usr/include/pwd.h and /usr/src/lib/libc/gen/getpwent.c,
  292. respectively.  After applying the patches, rebuild your standard C
  293. library with the new getpwent.  Programs which use the old getpwent
  294. will fail on password checking if they do a strcmp rather than a strncmp.
  295. [ I do not seem to have these two patches.  I have provided an entire
  296. getpwent collection of code which may be useful instead. -jfh ]
  297.  
  298. These changes are based on BSD4.3, not Tahoe
  299.  
  300. ToDo BSD:
  301.  
  302. I'm working on this in my copious spare time (hah!); any help would
  303. be appreciated.  If you decide to help, do these independantly rather
  304. than rework BSD code!  Keep it redistributable!
  305.  
  306. No dbm functions have been put in place.  Dbm functionality is needed
  307. for both /etc/password and /etc/shadow management.  [ It is now possible
  308. to create /etc/passwd.dir and /etc/passwd.pag using the new mkpasswd
  309. command.  getpwuid and getpwnam both use these files.   Also, the 
  310. commands chfn, chsh, and chage all update the DBM files. -jfh ]
  311.  
  312. The BSD GECOS field gets used for lots more stuff than the USG.  At a
  313. minimum this functionality should be duplicated under BSD; better is to put
  314. it into USG as well; still better would be to make the chfn command for
  315. both systems; best would be site-configurable data to be put into GECOS/chfn.
  316. [ this is now possible using chfn and the -o option. - jfh ]
  317.