Hi,
There is a section in "Perl for system administration (O'reilly)" that
covers account management.
The examples use the useradd / userdel commands instead of editing the
password files directly - this they say handles all the file locking for you
:) .  Passwords are changed using some nice use of expect.pm

Im working on a simialr project using these example as a base to work from.
Does anyone see any big NO-No's with this????

Regards
Mark

----- Original Message -----
From: "Joshua Colson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 11, 2001 8:24 PM
Subject: Can I use PERL to add/remove /etc/passwd entries


> I'm curious to know if someone could point me in the right direction to
find
> out how to manipulate the /etc/passwd file and/or the /etc/shadow file.
>
> I know about getpwent, getpwnam, getpwuid, but these just let me recreate
> the structure of the file, I want to be able to modify it. Mostly to
change
> the GCOS fields, and occasionally to rename a user.
>
> Joshua Colson
> Systems Administrator
> Giant Industries, Inc.
> (480) 585-8714
> [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to