Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

VanLUG Mailing List
Re: Creating 100's of users with passwords

New Message Reply About this list Date view Thread view Subject view Author view

Mike Bell (athasian@altavista.net)
Fri, 10 Sep 1999 21:47:57 -0700


On Fri, Sep 10, 1999 at 08:56:11PM -0700, falstaff@lennon.postino.com wrote:
>
> I am trying to setup over 100 users on a RH6 linux box, with passwords.
> I have a perl script that runs /usr/sbin/adduser to create the users, but
> I cannot figure out how to create the passwords. Someone suggested using
> chpasswd to change the passwords, but I cannot figure out how to pipe
> a list of users & passwords to the command. Any help appreciated.

Well, you can just use cryptpw to generate the password if you are going to
edit the raw password file, just add the right lines to /etc/passwd and
/etc/shadow.

Or, if you want to do things in a more kludgy fasion, you can probably just
pipe it to the command passwd...

passwd username\n
password\n
password\n

Or, worst comes to worst, you could also try replacing the null password
given by adduser --disabled-password to the cryptpw output for that user in
/etc/shadow.

Don't know the most elagent method (well, modifying adduser probably is, but
if you're not up to that then the next most) but these should work...


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Sat 11 Sep 1999 - 04:49:27