<4> pwconv 命令 将密码写入shadow文件
  pwconv
  优化方案:写脚本

#!/bin/bash
#add-some-users.sh
#The script is add some users to a new group.
echo "Welcome to the add some users!"
echo -n "Please input the new group(example : mygroup) : "
read  my_new_group
groupadd $my_new_group
echo -n "Add the $my_new_group group is successful!"
echo "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
echo "Then add some users to the $my_new_group group!"
echo -n "Please input the username(example: student) : "
read new_user
echo -n "Please input the username(begin_id)(example: 1 ) : "
read begin_id
echo -n "Please input the username(end_id)(example: 10 ) : "
read end_id
echo "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
for ((i=$begin_id;i<=$end_id;i++))
do
#add the new_user to the my_new_group,and no add new_user's group
useradd -n -g $my_new_group $new_user$i
#delete the new_user password
passwd -d $new_user$i
chage -d 0 $new_user$i     //
done
echo "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
  5.2 限制用户su 为root
  groupadd sugroup
  chmod 4550 /bin/su
  chgrp sugroup /bin.su
  ls -l /bin/su
  设定后,只有sugroup组总的用户可以使用su切换root
  sueradd bob
  passwd bob
  usermod -G sugroup bob
  5.3 用sudo 替代su
  sudo 的配置文件 /etc/sudoers
  (管理员)编辑配置文件命令:
  visudo
  格式:用户名(组名)主机地址(主机名)=命令(路径)
  例如:
  用户授权:bob 192.186.9.3=/usr/sbin/useradd,/usr/sbin/userdel
  组授权:  %webadmin host1=/bin/vim /etc/httpd/conf/httpd.conf