here's one way of doing it (a very Perl-y way, in keeping with my
proud(?) tradition)

1) keep a mirror of your /etc/passwd and /etc/shadow in your database

2) you can use Text::CSV_XS to input /etc/passwd and /etc/shadow into
the tables

3) any updates go to the database tables, NOT the flat files. the database
may be on another machine, etc, etc (and the httpd doesnt need to run as
root or something similarly dangerous) -- you can use Apache::ASP or any
similar Perl-embedded-in-HTML tool to do the actual db updates

4) on the machine containing the accounts, you have a cron job which
periodically reads the passwd/shadow tables and synchronizes the flat
files to them. this cron job is owned by root (and is written in perl,
too..)

(mozcom does it kinda this way, except the passwd is not stored in a
special table but as part of the client's information, along with address,
phone number, etc)

OTOH.. ISPs like Pacific keep the dialup and email passwords separate. so
they never need to sync (sa mozcom, your dialup username is your email
username so there's an added complication)


-- 

---------------------------------------------------------------------
Orlando Andico <[EMAIL PROTECTED]>       POTS Phone: +63   (2) 937-2293
Mosaic Communications, Inc.            GSM Mobile: +63 (917) 531-5893
I'm not suffering from insanity -- I'm enjoying  every minute of it!!


_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to