Batch of create users

#! /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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章