Ron --

...and then Ron Powell said...
% 
...
% > Thus, you should probably go back to your LAH and read up on 
% > what it has to say about adding users, and see if there is a 
% > "useradd" or "adduser" or similar script provided (what 
...
% 
% Heh, yeah, there are automated tools called adduser and userdel (and

Good; that's a start.  You may even find them sufficient for your needs.


% others), but the book seems to suggest that you could use perl to do it all
% as well.  I'll re-read that section tonight, to make sure I'm not going

Of course; you could use perl to do anything ;-)


% crazy, but it seemed to say that you could use perl as a sort of "wrapper"
% to tie all the automated processes together.  What really got me thinking

Right.


% was the password changing part.  When you create a users's password, it asks
% for the password, and then for you to confirm it, and I couldn't think of
% how to automate that in perl.  Hence the reason for the question :)

Ahhh...  That's a different question, then :-)

AFAIK you'd probably want to use expect, as you said, to set the password
if you type it in by hand, but there is an expect module for perl (as
already noted) and I also wonder why bother since you'd only do it once
and thus could just type it anyway (a *lot* easier to code, no?).  If
you'll be generating passwords, then your script can do the encryption
and paste it into the password field (in the passwd or shadow file, as
appropriate) without expect, too.


% 
% Ron


HTH & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg24563/pgp00000.pgp
Description: PGP signature

Reply via email to