########################################################################
wwwadduser	Michael Behrens <michael@gothmog.kingston.net>
########################################################################
Little elf helpers ;) -	Jason Wilson <jasonw@glycerine.mulberry.com>
########################################################################

WARNING: The following files have hard coded path names that will
         need to be edited for your particular system

	bin/addit.pl
	cgi-bin/adduser.pl
	htdocs/useradd.shtml


This is a stripped down version of something I wrote to add users
to our system.  It was originally designed in order to not have to
give root password to office staff in order to add a user to the 
system.

A few caveats before we get into the config stuff ;

	a) these scripts can possibly compromise your system,
	   I take no responsibility whatsoever if this happens.

	b) THESE SCRIPTS CAN POSSIBLY COMPROMISE YOUR SYSTEM.
	   Just thought that needed to be said again.

	c) Read point's a and b again.

	d) These scripts are covered under the GPL, feel free
           to modify/distribute/rm -rf * as you wish, so long
     	   as my name, and the names of persons who helped
           contribute to this stay in the source.  If you 
           choose option rm -rf * I still expect my name
	   to remain in the source ;)


#####################################################################
INSTALL
#####################################################################

Your webserver must support server side includes (SSI), turn
them on, at least for the following area.

Put the following in your access.conf

<Directory /u/httpd/htdocs>
<Limit GET POST PUT>
AuthType Basic
AuthName Admin
AuthUserFile /u/httpd/conf/.htaccess
require valid-user
Options Indexes Includes FollowSymLinks
AllowOverride AuthConfig
order deny,allow
deny from all
allow from myhost.mydomain.com 
</Limit>
</Directory>

You will need to be familiar with setting up access control
via the htpasswd program that comes with nsca or apache.  This
is used to authenticate users so that not just any ^H^Hluser person
can add a user to the system.  If your not, check out
either hoohoo.ncsa.uiuc.edu or www.apache.org for docs
on the subject.  I strongly suggest the use of apache
with these, and as well, I stronly suggest you invest in 
Stronghold with an RSA key to encrypt the data ;)


Don't use Internet Explorer from microsoft ;) it caches passwords
which is a big nono, even if you set the "do not save this password
switch". Use lynx, or netscape.

All files in the cgi-bin directory of the tar file, should
go into the cgi-bin directory of your webserver, all files in the
htdocs should go into your document root directory (well, preferably
a subdirectory).  The file in the bin directory, should go
anywhere you feel comfortable with, I use /usr/local/bin

Start with the WARNING above, I have done my best to mark in the
files, where a hardcoded path exists, however, I may have missed
some. Change the hardcoded paths to suit your system.

Next, change the useradd.shtml POST= statement to match the
hostname your running the cgi-bin on.

It is important that the scripts know where all the file names
reside.  Helpful arn't I ;)

adduser.pl will write out a file, that addit.pl users to add the
user.  Ergo, both adduser.pl and addit.pl need to be writing and looking
at the same directory for the file.  After the user is added, 
addit.pl removes this file from the directory so the user isn't added
again.

Put addit.pl in root's crontab with a line like

05 9,10,11,12,13,14,15,16,17,18,19 /usr/local/bin/addit.pl 

This will run the addit.pl script 5 minutes after the hour from
9am - 7pm

###############################################################

Once you've muddled through these almost completely useless
docs, and managed to get everything right, you should be
able to then point your browser at the URL you've setup
for it, and add a user. 

###############################################################

Next, you'll be asking, but I have shadow passwords, well, if your
cluefull enough to install shadow, then you should be cluefull
enough to check out addit.pl and edited to add to a shadow password
file, which is about an additional 8 lines of code ( I say 8 because
I suck at perl, Larry could probably write this entire deal on one
line blindfolded and crippled with arthritis faster than I did =;))

###############################################################

Next, DO NOT contact anyone in listed in the code, or this readme
in regards to questions/options/configuration issues other than
myself.

###############################################################

If you like this code, or find it helpful, or want to thank me
for providing such well written documentation, I accept coffee, 
2 cream (cream != milk), no sugar.  Anonymous cash donations
in amounts no smaller than $20.00 u.s. (Just to standardize)
are greatfully accepted but first you have to find me.

################################################################
