1. 程式人生 > >Batch of create users

Batch of create users

done swd have code creat else don user null

#! /bin/bash
for i in seq -w 11 20;do
id user$i &> /dev/null
retal=$?
if [ $retal -ne 0 ];then
useradd user$i &>/dev/null
echo echo $RANDOM123|md5sum|cut -c 1-10| passwd --stdin user$i &> /dev/null
echo "useradd have created."
else
echo "this users exists."
fi
done

Batch of create users