[Ilugc] adding multiple user accounts with password
Tom Jose Tharayil
tom at tharayil.com
Mon Jul 12 02:23:10 IST 2004
> Sridhar R wrote:
>
>> I want to add enourmous amount of users with specified passwords
>> automatically with script. But the problem is `passwd` command
>> doesn't accept passwords from non-stdin stream and `adduser` command
>> requires encrypte version of password if at all passed is needed to be
>> given.
>
> $ useradd foo -p `openssl passwd -1 bar`
>
> Adding user 'foo' with password 'bar'
and for adding multiple users (or an enormously large amount of them)
for i in `seq 1 100`
do
useradd foo$i -p `openssl passwd -1 bar`
done
would add users foo1 foo2 and so on
HTH
--
Best Regards
Tom Jose Tharayil
tom at tharayil.com
More information about the ilugc
mailing list