1
echo admin{1..10}|xargs -n 1 | xargs -i echo ‘{}:openssl rand -base64 5’ | awk -F”:” ‘{print “useradd”,$1″;””x=$(“$2″);echo $x >> password.doc;echo $x””|””passwd –stdin”,$1}’ | bash
2
echo admin{1..10}|xargs -n 1 | xargs -i echo ‘{}:openssl rand -base64 5’ | awk -F”:” ‘{print “useradd”,$1″;x=$(“$2″);echo $x >> password.doc;echo $x|passwd –stdin”,$1}’
3
echo staff{1..10}|xargs -n 1|awk ‘BEGIN{pw=”openssl rand -base64 5″}”{print “useradd “$0”;pass=$(“pw”);echo $pass>>/psw.sec;echo $pass|passwd –stdin “$0}’ | bash
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/1987.html