vim useradd.sh
#!/bin/bash
#自动创建系统用户
groupadd ts
for username in ts1 ts2 ts3 ts4 ts5 ts6 ts7 ts8
do
useradd -G ts $username
echo "123456" | passwd --stdin $username
done
vim useradd.sh
#!/bin/bash
#自动创建系统用户
groupadd ts
for username in ts1 ts2 ts3 ts4 ts5 ts6 ts7 ts8
do
useradd -G ts $username
echo "123456" | passwd --stdin $username
done
转载于:https://www.cnblogs.com/chenjw-note/p/5704037.html