Forked from vajapravin/notify_wrong_ubuntu_login_attempt.sh
Created
September 2, 2016 15:50
-
-
Save Oxicode/fd693e634d70a1da9ca01bc63a330021 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -fn0 /var/log/auth.log | \ | |
while read line ; do | |
echo "$line" | grep "password check failed for user" | |
if [ $? = 0 ] | |
then | |
echo "Wrong Login Attempt" | mail -s "Login Password Wrong - GigoLinux" [email protected] | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment