The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-15-2007
paqman paqman is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 21
Modify users password via script?

Ok, first off, I'm working on a Vmware ESX server, which I guess is loosely based off of Red Hat 9. But I'm brand new to it (today), so be nice.

I'm trying to write a useradd script that will create some users, generate a password, and set their password to this newly generated password.

Now by hand, I can use the useradd command, and then use passwd to change their password. But if I've got to set up a couple hundred users, this is not enjoyable.

So if I can't use passwd in a script (because it requires user interaction), how can I create these users with some default password?