#复制备份一份passwd和group cp /etc/passwd /etc/passwd.sav cp /etc/group /etc/group.sav #删除没用的用户和用户组 for a in adm lp sync news uucp operator games gopher mailnull nscd rpc; do /usr/sbin/userdel $a -f; done for a in lp news uucp games gopher users floopy nscd rpc rpcuser nfsnobody; do /usr/sbin/groupdel $a -f; done