home *** CD-ROM | disk | FTP | other *** search
- This little code drop contains two different utilities. The first
- outlines how to modify password files in "batch" mode. The second
- is a utility for creating users in "batch" mode.
-
- The first utility, "chpasswd", reads its standard input for colon
- separated pairs of user names and passwords. The password for the
- named user is set to the cleartext which follows. A random salt
- is generated and used as input to the crypt() subroutine.
-
- The second utility, "newusers", reads its standard input for
- records looking like entries in a password file. The entries in
- this file are used to update the password file entries of existing
- users, or to create new entries if the user does not exist. The
- expected values for the fields are -
-
- name - a normal user name
- password - the cleartext of the user's password. it
- will be encrypted with a random salt. it
- can't be blank just yet (or a value making
- the account expired. give me some time).
- uid - blank, or an integer. the uid is figured as
- being the next highest uid. this may have
- some problems.
- gid - blank, or a group name. if blank, the gid will
- be either the same as the uid, or the next
- available gid. if a name, the user will be
- added as a member. this isn't that well
- thought out just yet ...
- gecos - the new gecos field, or blank.
- dir - the new home directory (which will be created
- if it is non-blank and non-existent), or blank.
- shell - the new login shell, or blank.
-
- Entries will be added to /etc/group as required, and if requested,
- entries to /etc/shadow will be updated as well. See the code if
- you have any questions. Documentation will follow later. Oh -
- the /etc/shadow file is in SVR4 format. Sorry, but that is the
- direction this work is going. If you want SVR3.2 format, run
- without shadowing turned on, then use the pwconv utility to update
- the shadow file. To get vanilla UNIX (no shadows of any kind)
- use "config.h.std" in place of "config.h"; it has the correct
- defines to get you boring, dull, uninteresting password files.
-
- Along with this you get the first [?] release of a collection of
- library routines for dealing with password files in a more orderly
- fashion. There will be more documentation and features in the
- future. The interface that this code presents is intended to
- remain fixed forever, with only the implmentation changing as
- needed.
-
- Steve Simmons presented a talk on this work at the recent LISA
- conference. If you attended his talk, this is some of the code
- that is being worked on.
-
- Please notice that this code is COPYRIGHTED and that I do have a
- policy of enforcing copyrights. This is to protect the integrity
- of the work and not to restrict its use or normal distribution.
- If you have any questions regarding commercial distribution,
- please feel free to contact me.
-