#!/bin/sh
#查系统手工建的帐号,有SHELL权限的
cat /etc/passwd|awk -F : '{print $1"\t"$3"\t"$7}'|grep -E -v "/bin/false|bin/sync|nologin" >/tmp/bashuser.txt
cat /tmp/bashuser.txt |awk '{print $2}'>/tmp/bashtmp.txt
for i in `cat /tmp/bashtmp.txt`
do
if [ ${i} -gt 500 ]
then
#echo ${i}
cat /tmp/bashuser.txt |grep ${i}|awk '{print $1"\t"$2"\t"$3}' >>/tmp/users.txt
fi
done;
rm /tmp/bashuser.txt
rm /tmp/bashtmp.txt
echo "view /tmp/users.txt !"
阅读(706) | 评论(0) | 转发(0) |