- 论坛徽章:
- 0
|
zhong wen shu ru fa hu ran yong bu le le ,mei ban fa ,zhi hao zhe yang wen le.
xia mian shi wo chuang jian duo yong hu de yi ge jiao ben
wo xiang gei mei ge yong hu dou jia shang tong yang de mi ma :111111
gai ru he xiu gai
Did you mean:
I have to ask my question using Chinese Pinyin because of sudden failure of the input method.
The following script was used by me to add users.
Now, I want every new user to be created to use a same password, what can I do with this script?
#!/bin/bash
i=1
groupadd class
while [ $i -le 30 ]
do
if [ $i -le 9 ];then
username=stu0$i
else
username=stu$i
fi
useradd $username
mkdir /home/$username
chown $username.class /home/$username
i=$(($i+1))
done |
|