Hello,
Try this for adding multiple users with default password,

i=1
while [ $i -le 5 ]

do

useradd u${i}

echo u${i} | passwd --stdin u${i}

echo "User u$i is created"

i=`expr $i + 1`

done

Regards,
Bilal Ahmed


Milind Vyas <[EMAIL PROTECTED]> wrote:                                  Hi 
friends,
 
 I want to create some around 500 - 1000 id's like u1,u2,u3..so on.. and
 apply default password same as user name.
 
 I tried to automate this using shell script by running adduser command in to
 loop. 
 
 while [ $i -le 1000 ]
 
 do
 
 adduser u$i
 
 passwd u$i
 
 echo "User u$i is created"
 
 i=`expr $i + 1`
 
 done
 
 The user gets created with this but for the setting password with passwd
 command it asks for user input. 
 
 Is there any way to give password as command line argument to passwd
 command, so I can automate the setting of passwords.
 
 Thanks & Regards,
 
 Milind Vyas
 
 [Non-text portions of this message have been removed]
 
 
     
                       

                                
---------------------------------
 Find out what India is talking about on Yahoo! Answers India.

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/0XFolB/TM
--------------------------------------------------------------------~-> 

***Archives:
http://groups.yahoo.com/group/linuxvadapav/messages

***Group Usage Guidelines (Please Read):
http://groups.yahoo.com/group/linuxvadapav/files/mailing_rules 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/linuxvadapav/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to