标签:shell
#!/bin/bash
del=$(cat /etc/passwd | grep "/bin/bash"|awk -F: ‘$3>=500 {print $1}‘)
for i in $del
do
/usr/sbin/userdel -r $i &> /dev/null
done
shell批量删除UID>=500普通用户
原文地址:http://12187655.blog.51cto.com/12177655/1920701