-----BEGIN PGP SIGNED MESSAGE-----



                                                                    -*-Text-*-

grppasswd utils version 1.1 - (C) Ragnar Hojland Espinosa, 1997

0. Where is grppasswd?

  Even if it might look like a silly question if you just downloaded
this, I often found myself using 'strings' to find the site with a
an upgrade of certain package just because there is no notice in the
documentation.  In addition of your favourite sunsite mirror, you can
find the latest version of grppasswd at: 

       http://www.redestb.es/personal/ragnar


1. What did you just get?

  For quite some time I had been looking at /etc/group and wondering why
I couldn't find anything that used it's password field, and I figured out
that one of the reasons could be that there was nothing around to find! :) 
Right now, it doesn't support NIS or shadow passwords. If you'd like to
see this in the program, just let me know and I'll put some work on it.
I'd appreciate any kind of suggestions and ideas, specially on checks to
be performed on pwchk.



2. Group Passwords

  You might be wondering, if groups now have passwords, who can change
them? The first idea that comes to mind is root, since if anyone in the
same group could change the password for a group you'd quickly find a
user who would lock all the rest of the users out. Root or non root, the
sysadmin would get even more overloaded with work (we don't want that!:)

  Since I didn't want to change the format of the group file, there is
another solution that is the one I used: the first user in the group
member list is the group leader, and he and root are able to change
group passwords.

  Please note that using group leaders gives a user the possibility of
totally locking out all the members of that group. This is an issue you
should seriously consider (Imagine what would happen if someone without a
warning changed the 'users' password: chaos, threating calls in the night..)



3. Customizing, compiling and installing

  Have a look and edit grppasswd.h, pwchk.h and grplogin/pathnames.h and
Makefile. There are comments placed to help you out in case something isn't
clear. To compile and install,

       make              
       make install

if you defined group leader support in grppasswd.h

       chmod u+s /usr/bin/grppasswd

  You obviously need a new login program that supports group passwords.
The one that comes with this package is a derivation from login v. 5.40
and has been already modified. Run grplogin/login and make sure you can
log in before installing it, and remember that gettys already spawned by
inittab will still be running the old login.

  One warning: addgroup and pwchk MUST NOT BE setuid root, and grppasswd
doesn't need to either unless you compile it with group leader support
(otherwise group leaders wouldn't be able to change the passwords)

  If you plan to run pwchk with strictness set, you might have to edit
your password file a little bit so that every user has a name (doh!:), a
home directory and a shell. Use /dev/null if you don't want to set one.



4. Man pages

  No man pages, sorry. I don't do groff, or troff or whatever format you
can use to write them. If you want to volunteer and give me a little
(big!) hand with them, go ahead and let me know. The programs do have
helps, tho (oooh!;) 
  

4.1. addgroup

Purpose: To add a new group interactively or from the shell.

Usage: addgroup [OPTION]

  -n, --name=WORD
  -g, --gid=GID
  -p, --password=WORD
  -u, --users=WORD
  -h, --help
  -V, --version

Example:  addgroup --name=develop --users='ragnar,steven'


4.2. grppasswd

Purpose:  To change the password for any group. If you don't provide the
          group or password name you will be asked for it. To clean a password
          field, use ''

Usage:    grppasswd [GROUP] [PASSWORD]

Example:  grppasswd users ''


4.3. pwchk

Purpose:  To check the format of the password file. A little part of it's
          behaviour can be controlled with the settings:

Setting      Min. level
Interactive  1  Asks for root password to check if you can log in correctly.
Verbose      0  No messages outputed. Check success with exit code.
             1  Error messages are reported.
	     2  Success messages are reported.
Strict       1  Each user must have a password, directory and shell.
             2  Shell must be found in /etc/shells
  
Usage:    pwchk [OPTION]

  -v, --verbose=NUM       increments verbosity
  -s, --strict=NUM        increments strictness
  -i, --interactive=NUM   increments interactivity
  -h, --help              displays this help
  -V  --version           displays version information
	  
- -vvv is equivalent to --verbose=3
	  
Example:  #!/bin/sh
          # pwchk was meant to run in a shell script that run the editor
	  # until the file format was correct. A simple example can be:
	  
          vi /etc/passwd
	  pwchk
	  if [ $? == 0 ]
	  then 
	      echo Ok.
	  else
	      echo Invalid password file, please fix it.
	  fi


5. How to be sure I got the originals?  (Yes, I'm kinda paranoid;)

  If you have pgp and md5sum installed on your system (you should), first
check for a valid PGP signature on this file. Then do a `make check`, which
must dump the following (of course, before you perform any modifications):

623278fed18dd0b86dd9b3701d98e4b0  common.c
7be7c6874ead22b6dc0a5146927524d2  grppasswd.c
5a78ae87b8e97bb3b85ef89c581d6598  pwchk.c
0a787aed7b0a53b404854748ec1c9b42  common.h
2e453bcc5399d1b1728c9a985aa2029a  grppasswd.h
7013c66581018cec2d16283fa64ccce5  pwchk.h
d9c3edd01295c9d21bac59192c1d536a  Makefile
036a0227156fd95fba714afb7b08ef62  grplogin/checktty.c
e53de73cc6fb051651abacb2e32306ea  grplogin/getpass.c
356b33a0993662a2fc966028230cbc20  grplogin/login.c
90ad88ab2f32ac33ca4cccdd142339b7  grplogin/pathnames.h
e4888eba61eaccdfa33697d2ff02505b  grplogin/Makefile
8ca43cbc842c2336e835926c2166c28b  License
219c283d14e56be955eca8528ee8b754

  You can get my PGP public key at the web page mentioned above,
fingering tech.support@redestb.es or with 

       mail -s "get ragnar hojland" pgp-public-keys@keys.pgp.net 



6. TODO

  Clean the programs a bit. Originally I didn't thing in releasing this..
hell, I didn't even think in what I was doing.. it was just fun to do so :)
so there was no effort put into coherence and cleaness.

  If you have any ideas, comments, suggestions or bug reports (hopefully
not:) to send, you can email me at:

       tech.support@redestb.es   or  ragnar@dfyre.ccon.net 


                                           Enjoy, Ragnar  :)
				           1997-08-13, Zamora (Spain)


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQEVAwUBM/GNVz29O5ea1oe9AQH5mAf/YgD/yoqlitU5mL9xcyf2S58sDfTFA5gg
eD9ga+7ZUDpmvU+TDoOtSbtvPeBXcPtefEgRB93ZYAkkYbXPg9xHb8xAfANuj9Cd
FHnLYUoSUSpf5f07lXVlh9LwKfEDIhTMgXXkdOiwzekT0MC94FHx4CgYXrIGBTAK
QN8QhAbBejJC7VwclZYQvovsnsnCQhjhUzwQj8363nK0Ws0H604XiCUtelvS/jJe
tI/q3vGm03PvPgGFedpYA886iP759lWsWwpEJgQ4+2wNvvfWgc0zvWBWNF7alpiY
7om01yOyvcOBnzWNfwv7vu5g1Mstb8IRQvrGTE295jJ17ooxhimZDA==
=fjny
-----END PGP SIGNATURE-----
