(file) Return to audit.sh CVS log (file) (dir) Up to [RizwankCVS] / all_info_tools

 1 rizwank 1.2 #!/bin/sh
 2             
 3             #Audit Script - grabs useful info and packs it away
 4             #(c) Rizwan Kassim 2005
 5             
 6             mkdir /tmp/audit_ait
 7             cd /tmp/audit_ait
 8             touch $HOSTNAME.overall.log
 9             echo "########## HOSTNAME, uname, w, whoami, id" >> $HOSTNAME.overall.log
10             echo $HOSTNAME >> $HOSTNAME.overall.log
11             uname -a >> $HOSTNAME.overall.log
12             w >> $HOSTNAME.overall.log
13             id >> $HOSTNAME.overall.log
14             echo "######### df mounts"
15             df >> $HOSTNAME.overall.log
16             touch $HOSTNAME.network.log
17 rizwank 1.3 echo "######### Network settings - netstat,services,chkconfig,ifconfig" >> $HOSTNAME.network.log
18 rizwank 1.4 netstat -an >> $HOSTNAME.network.log
19 rizwank 1.3 services --status-all >> $HOSTNAME.network.log
20             chkconfig --list >> $HOSTNAME.network.log
21             ps -aux >> $HOSTNAME.tasklist.log
22             ifconfig >> $HOSTNAME.network.log
23             echo "######## cronlist + cron jobs" >> $HOSTNAME.overall.log
24             crontab -l >> $HOSTNAME.overall.log
25             echo "## crontabs in var" >> $HOSTNAME.overall.log
26             cat /var/spool/cron/* >> $HOSTNAME.overall.log
27             ls /etc/cron* >> $HOSTNAME.overall.log
28             cp -r /etc/cron* .
29             du -ab > $HOSTNAME.dufile.log
30             du -b > $HOSTNAME.dudir.log
31             /etc/cron.daily/rpm
32             cp /var/logs/rpm* .
33 rizwank 1.4 cp /etc/grou* .
34             cp /etc/gsh* .
35             tar -cvf $HOSTNAME
36 rizwank 1.2 

Rizwan Kassim
Powered by
ViewCVS 0.9.2