home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3345 / README < prev   
Encoding:
Text File  |  1991-05-17  |  12.4 KB  |  328 lines

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