shell 不使用循环批量创建用户
echo user{1..10}|tr " " "\n"|awk '{print "useradd",$0,";date +%N|md5sum|cut -c 1-10 >> pass;echo $(tail -1 pass)|passwd --stdin",$1}'
本文来自博客园, 作者:Star-Hitian, 转载请注明原文链接:https://www.cnblogs.com/Star-Haitian/p/7966273.html
echo user{1..10}|tr " " "\n"|awk '{print "useradd",$0,";date +%N|md5sum|cut -c 1-10 >> pass;echo $(tail -1 pass)|passwd --stdin",$1}'
本文来自博客园, 作者:Star-Hitian, 转载请注明原文链接:https://www.cnblogs.com/Star-Haitian/p/7966273.html