#!/bin/bash
cat user.txt | while read line
do
useradd $line
echo "123456" | passwd --stdin $line
done
备注: 准被好user.txt每行放一个用户,再创建.sh执行ok
#!/bin/bash
cat user.txt | while read line
do
useradd $line
echo "123456" | passwd --stdin $line
done
备注: 准被好user.txt每行放一个用户,再创建.sh执行ok