User/Password generation

Andrew Mathews andrew_mathews
Mon May 17 11:47:04 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to figure out a way to do a mass user conversion for a mail
server that's going to require some trickery. Currently running
Post.Office on IBM RS/6000 & AIX 4.3.3 and going to dual Xeon running
Linux/Sendmail. The Post.Office mailer doesn't use the regular
/etc/passwd and /etc/security/shadow for AIX, it keeps it's own db file
for users which isn't parseable by anything other than Post.Office. I
can create a script to use the utilities provided by Post.Office to
create a file with user id's, real names, and email addresses. What I
need to do is parse this file and for each user id, create an account,
generate an acceptable password with the apg password generator such as:

[root at linus /]# apg -a 0 -m 8 -n 1 -M SNCL -y
Ols#7Meg (Ols-CROSSHATCH-SEVEN-Meg) dMyMzvcWURxvQ
~    |                 |                 |
(plain password) (description)  (encrypted password)

and mail the plain password to $user at domain.com 30 days before the
rollover, and populate the /etc/passwd and /etc/shadow file with the
same id and password. I'm quite willing to use the newusers command on a
file with this info, but trying to combine the account creation, setting
the account password to the one generated by apg, and mailing the user
with this information in a one shot process looks like it may require
expect, perl, or some additional capabilities beyond a "normal" shell
script. Doing this by hand would put me 3 kernel releases behind as I
have over 1700 users and 300 mailing lists, so automating this for a
smooth transition is a necessity.
I know several of you have substantial perl skills so any ideas or even
a different methodology is appreciated.
TIA,
- --
Andrew Mathews
- ---------------------------------------------------------------------
~  4:14pm  up  2:29, 10 users,  load average: 0.24, 0.22, 0.26
- ---------------------------------------------------------------------
What the large print giveth, the small print taketh away.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQE+tZhtidHQ0m/kEssRAuMmAJ4wI1TGXcLiiYNANNWXzhhZv4DVNACbBuUq
MfHOIn+nm19wENgoiXviMoo=
=I23x
-----END PGP SIGNATURE-----



More information about the Linux-users mailing list