转至:https://blog.csdn.net/weixin_34409357/article/details/89833777?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
#!/usr/bin/env bash
count=1
for n in `cat /root/user.txt`
do
count+=1
useradd $n
echo 'aaaa' | passwd --stdin $n
done
user.txt
aaa
bbb
ccc