#!/bin/bash
clear
read -p "请输入创建用户的名称前缀:" qzread -p "请输入创建用户的个数:" numread -p "请输入用户的初始密码:" psread -p "请输入用户的失效时间(YYYY-MM-DD):" exti=1while [ $i -le $num ]do if [ ! -z $ext ] then useradd -e $ext $qz$i else useradd $qz$i fi echo "$ps" |passwd --stdin $qz$i &> /dev/null chage -d 0 $qz$i let i++done
=========================================================
#!/bin/bash
for i in user{1..20}
do userdel -r $idone