#/bin/sh 

#------------------------------------------------------- 
# Linux Audit Information Gather Script For **
# 2010-1-5 {version 0.1 by **}
# http://www.**.com
#------------------------------------------------------- 
# Define some Vars,Fix it yourself if any problem !
 
banner="Linux Audit Information Gather Script For ***"
 
LogFile="sysinfo.txt"
errFile="/dev/null" 
 
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
echo -e $banner >> $LogFile 
date +%Y-%m-%d/%H:%M >> $LogFile 
 
echo -e "[cat /etc/passwd]"
  cat /etc/passwd >> $LogFile 
echo -e "[ls -al /etc/passwd]" >> $LogFile 
  ls -al /etc/passwd >> $LogFile 
echo -e "[cat /etc/security/passwd]"  >> $LogFile 
  cat /etc/security/passwd >> $LogFile 
  echo -e "[ls -l /etc/shadow]"  >> $LogFile 
  ls -l /etc/shadow >> $LogFile 
 echo -e "[ls -al /root/.*]"  >> $LogFile 
  ls -al /root/.* >> $LogFile 
 echo -e "[ls -al /]"  >> $LogFile 
  ls -al / >> $LogFile 
 
echo -e "[cat /etc/login.defs]"  >> $LogFile 
  cat /etc/login.defs $LogFile 
echo -e "[cat /etc/pam.d/system-auth]"  >> $LogFile 
  cat /etc/pam.d/system-auth >> $LogFile 
echo -e "[ls -l /etc/security/opasswd]"  >> $LogFile 
  ls -l /etc/security/opasswd  >> $LogFile 
echo -e "[cat /etc/profile]"  >> $LogFile 
  cat /etc/profile >> $LogFile 
echo -e "[cat /root/.profile]"  >> $LogFile 
  cat /root/.profile >> $LogFile 
echo -e "[grep –r TMOUT /home/]"  >> $LogFile 
  grep –r TMOUT /home/  >> $LogFile 
echo -e "[grep –r TIMEOUT /home/]"  >> $LogFile 
  grep –r TIMEOUT /home/  >> $LogFile 
echo -e "[grep umask /etc/bashrc]"  >> $LogFile 
  grep umask /etc/bashrc >> $LogFile 
echo -e "[grep umask /etc/profile]"  >> $LogFile 
  grep umask /etc/profile >> $LogFile 
echo -e "[grep -r umask /home/]"  >> $LogFile 
  grep -r umask /home/ >> $LogFile 
 
echo -e "[cat /etc/shadow]"  >> $LogFile 
cat /etc/shadow >> $LogFile 
echo -e "[ls -l  /var/log/]"  >> $LogFile 
ls -l  /var/log/ >> $LogFile 
echo -e "[ypcat passwd]"  >> $LogFile 
ypcat passwd  >> $LogFile 
echo -e "[ls -l /var/log/faillog]"  >> $LogFile 
ls -l /var/log/faillog >> $LogFile 
 
echo -e "[cat /etc/hosts.equiv]"  >> $LogFile 
cat /etc/hosts.equiv >> $LogFile            
echo -e "[ls -l /etc/hosts.equiv]"  >> $LogFile 
ls -l /etc/hosts.equiv >> $LogFile 
echo -e "[chkconfig --list]"  >> $LogFile 
chkconfig --list >> $LogFile 
echo -e "[cat /etc/xinetd.conf]"  >> $LogFile 
cat /etc/xinetd.conf >> $LogFile 
echo -e "[cat /etc/xinetd.d/r*]"  >> $LogFile 
cat /etc/xinetd.d/r* >> $LogFile 
echo -e "[ls -al /home/*]"  >> $LogFile 
ls -al /home/* >> $LogFile 
echo -e "[cat ~/home_dirs.txt]"  >> $LogFile 
cat  ~/home_dirs.txt >> $LogFile 
echo -e "[lsof | grep LISTEN]"  >> $LogFile 
lsof | grep LISTEN  >> $LogFile 
 
echo -e "[chkconfig --list]"  >> $LogFile 
chkconfig --list >> $LogFile 
 
echo -e "[cat  /etc/vsftpd/vsftpd.conf]"  >> $LogFile 
cat  /etc/vsftpd/vsftpd.conf >> $LogFile 
 
echo -e "[cat  /etc/vsftpd.ftpusers]"  >> $LogFile 
cat /etc/vsftpd.ftpusers >> $LogFile 
 
echo -e "[cat  /etc/vsftpd.user_list]"  >> $LogFile 
cat /etc/vsftpd.user_list >> $LogFile 
 
echo -e "[cat  /etc/ftpaccess]"  >> $LogFile 
cat /etc/ftpaccess >> $LogFile 
 
echo -e "[cat  /etc/ftpusers]"  >> $LogFile 
cat /etc/ftpusers  >> $LogFile 
 
echo -e "[ls -al /etc/pam.d]"  >> $LogFile 
  ls -al /etc/pam.d >> $LogFile