#!/bin/bash
#useradd and password
echo "please input username:"
read name
echo "please input number:"
read num
n=1
while [ $n -le $num ]
do
useradd $name$n
n=`expr $n + 1 `
done
#/etc/shasow info
echo "please input passwd"
read passwd
m=1
while [ $m -le $num ]
do
echo $passwd |passwd --stdin $name$m >/dev/null
m=`expr $m + 1 `
done
阅读(1195) | 评论(0) | 转发(0) |