develooper Front page | perl.beginners | Postings from December 2002

Useradd and Passwd

Thread Next
From:
Kevin Old
Date:
December 23, 2002 06:28
Subject:
Useradd and Passwd
Message ID:
1040653521.3224.34.camel@oc
Hello all,

I have several users that I need to manage on a few (RH Linux) servers
and I have recently run into the need to move user lists from one box to
another.  I know I can copy the passwd and shadow files over from box to
box, but I'm not sure that I want to move the user and group ID's from
box to box.  

I've started to write a script that would take care of some basic user
additions.

The part that isnt' working the way I want it is a system command:

system("useradd $username; passwd $pass");

I've also tried: 
system("useradd $username; passwd $pass\n$pass\n$pass\n");

passwd just returns errors that it couldn't add the password.  

Anyone have any ideas what I can use?

Thanks,
Kevin

-- 
Kevin Old <kold@carolina.rr.com>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About