Chinaunix首页 | 论坛 | 博客
  • 博客访问: 646013
  • 博文数量: 98
  • 博客积分: 3145
  • 博客等级: 中校
  • 技术积分: 1902
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-15 12:52
文章分类
文章存档

2021年(1)

2020年(1)

2016年(8)

2015年(3)

2014年(1)

2013年(5)

2012年(4)

2011年(9)

2010年(12)

2009年(42)

2008年(12)

我的朋友

分类:

2009-08-25 10:10:09

#!/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 !"
阅读(629) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~