Newer
Older
icinga-plugins / check_jabber_passwords
paulchen on 1 Apr 2013 446 bytes restructuring repo
#!/bin/bash

ACCOUNTS=`echo "SELECT COUNT(*) FROM ejabberd_jabber_rueckgr_at.users WHERE password = 'simpler' OR password = 'CATSY' OR password = 'www' OR password = 'lololo' OR password = 'Quality' /* OR (username = password AND created_at > '2011-04-12') */" | mysql -u nagios_check -pXXXXXXXX|tail -n 1`

echo "$ACCOUNTS account(s) with suspicious password."
if [ "$ACCOUNTS" -gt 3 ]; then
	exit 2
elif [ "$ACCOUNTS" -gt 0 ]; then
	exit 1
fi