batch of passwords

From: Don H. Olive <don_at_andromeda.campbellsvil.edu>
Date: Wed, 15 Sep 1999 19:39:19 -0400 (EDT)

I need to add about 1500 new accounts to a new system which is easy
enough to do using the useradd command. I'll just make a shell script
with all the info in it and run it.

The question I have is on how to set 1500 passwords without actually
typing them in by hand. Is there a way to set a password using a
command line argument or some way to pipe in to the passwd command.

I tried "passwd < word.txt"

Where word.txt held a password on two separate lines but I still was
prompted. I can't get passwd to accept anything from the standard
input.

Any ideas would be greatly appreciated.

-- 
 Don H. Olive, Physics Department    don_at_campbellsvil.edu
 Campbellsville University           http://www2.campbellsvil.edu/~don
 UPO 1265, One University Drive      +1.270.789.5243 voice/+1.270.789.5042 fax
 Campbellsville KY, 42718 USA        PGP:  finger don_at_cygnus.campbellsvil.edu
Received on Wed Sep 15 1999 - 23:41:53 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT