#!/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
时间: 2024-11-03 21:04:33
#!/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