#!/bin/bash
. /etc/rc.d/init.d/functions
for i in `seq -w 10`
do
user=user$i
password=`echo $RANDOM | md5sum | cut -c 1-10`
useradd $user &> /dev/null
grep $user /etc/passwd &> /dev/null
if [ $? -ne 0 ];then
echo $password | passwd --stdin $user
action "add $user" /bin/true
echo "$user;$password" >> /tmp/passwd
else
action "add $user" /bin/false
fi
done