oh we're doing that now?
[ "$PAM_TYPE" = "open_session" ] || exit 0
#create the mail template
echo "Here's the last 2 lines from /var/log/auth.log" >> /tmp/authmail.txt
# grab the last two lines of the log
tail -n 2 /var/log/auth.log >> /tmp/authmail.txt
# convert to DOS linefeeds
awk 'sub("$", "\r")' /tmp/authmail.txt > /tmp/authmail2.txt
cat /etc/skel/mailtemplate.txt /tmp/authmail2.txt|ssmtp {email address} -au support -ap {password masked for purposes of emailing this}
rm -rf /tmp/authmail*
Results 31 to 60 of 113
Threaded View
-
04-03-2012
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)