Hi Milind,
Try the following... and let me know your feedback.
----------------------------------------------------------------------------------------------------------------
#!/bin/bash
encrypt()
{
/sbin/grub --batch --device-map=/dev/null <<- END \
| grep "^Encrypted: " | sed 's/^Encrypted: //'
md5crypt
$1
quit
END
}
if [ `id -u` -ne 0 ]; then
echo "$PROG: only root can do that"
exit 1
fi
for (( i = 1; i <= 999; i++ ))
do
useradd user$i
if [ $? -eq 0 ]; then
enpw=`encrypt user$i`
sed -i "s,^user$i:!!:,^user$i:$enpw:," /etc/shadow
fi
done
----------------------------------------------------------------------------------------------------------------
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.
>>
With regards,
Ansari M. Saeed
[EMAIL PROTECTED]
---------------------------------
Want to be your own boss? Learn how on Yahoo! Small Business.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/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/