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

  1. This little code drop contains two different utilities.  The first
  2. outlines how to modify password files in "batch" mode.  The second
  3. is a utility for creating users in "batch" mode.
  4.  
  5. The first utility, "chpasswd", reads its standard input for colon
  6. separated pairs of user names and passwords.  The password for the
  7. named user is set to the cleartext which follows.  A random salt
  8. is generated and used as input to the crypt() subroutine.
  9.  
  10. The second utility, "newusers", reads its standard input for
  11. records looking like entries in a password file.  The entries in
  12. this file are used to update the password file entries of existing
  13. users, or to create new entries if the user does not exist.  The
  14. expected values for the fields are -
  15.  
  16.     name - a normal user name
  17.     password - the cleartext of the user's password.  it
  18.         will be encrypted with a random salt.  it
  19.         can't be blank just yet (or a value making
  20.         the account expired.  give me some time).
  21.     uid - blank, or an integer.  the uid is figured as
  22.         being the next highest uid.  this may have
  23.         some problems.
  24.     gid - blank, or a group name.  if blank, the gid will
  25.         be either the same as the uid, or the next
  26.         available gid.  if a name, the user will be
  27.         added as a member.  this isn't that well
  28.         thought out just yet ...
  29.     gecos - the new gecos field, or blank.
  30.     dir - the new home directory (which will be created
  31.         if it is non-blank and non-existent), or blank.
  32.     shell - the new login shell, or blank.
  33.  
  34. Entries will be added to /etc/group as required, and if requested,
  35. entries to /etc/shadow will be updated as well.  See the code if
  36. you have any questions.  Documentation will follow later.  Oh -
  37. the /etc/shadow file is in SVR4 format.  Sorry, but that is the
  38. direction this work is going.  If you want SVR3.2 format, run
  39. without shadowing turned on, then use the pwconv utility to update
  40. the shadow file.  To get vanilla UNIX (no shadows of any kind)
  41. use "config.h.std" in place of "config.h"; it has the correct
  42. defines to get you boring, dull, uninteresting password files.
  43.  
  44. Along with this you get the first [?] release of a collection of
  45. library routines for dealing with password files in a more orderly
  46. fashion.  There will be more documentation and features in the
  47. future.  The interface that this code presents is intended to 
  48. remain fixed forever, with only the implmentation changing as
  49. needed.
  50.  
  51. Steve Simmons presented a talk on this work at the recent LISA
  52. conference.  If you attended his talk, this is some of the code
  53. that is being worked on.
  54.  
  55. Please notice that this code is COPYRIGHTED and that I do have a
  56. policy of enforcing copyrights.  This is to protect the integrity
  57. of the work and not to restrict its use or normal distribution.
  58. If you have any questions regarding commercial distribution,
  59. please feel free to contact me.
  60.