echo yu{1..10}|xargs -n 1|sed -r 's#(.*)#useradd \1;echo 123123|passwd --stdin \1#g'|bash
# 新增10个用户,用户名yu1-10,密码123123
echo yu{1..200}|xargs -n 1|sed -r 's#(.*)#useradd \1;echo 123123|passwd --stdin \1#g'|bash
# 新增200个用户,用户名yu1-200,密码123123
#!bin/bash
for var in {1..100}
do
useradd -r yu$var
echo 123123 | passwd yu$var --stdin
done
#!bin/bash
for var in {1..100}
do
userdel -r yu$var
done