自动创建系统用户脚本

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

posted @ 2016-07-25 16:34  chenjianwen  阅读(343)  评论(0编辑  收藏  举报