vim useradd.sh
#!/bin/bash#自动创建系统用户groupadd tsfor username in ts1 ts2 ts3 ts4 ts5 ts6 ts7 ts8do useradd -G ts $username echo "123456" | passwd --stdin $usernamedone