I'd like to run a script if the login on my machine fails 3 times (not ssh, but someone in terminal trying to login, or someone trying to physically login). Also, is if it is possible to configure the amount of times before running the script?
I've looked into PAM, and from what I understand, you can only run
.so files, and it looks like a huge hassle to set up. Any alternatives?
Another thing I thought about is, maybe Linux runs some script when login fails. If it does, then I could append
sh /var/myscript.sh or whatever. Any ideas?
I can't seem to find anywhere on the internet that covers this. If it is possible to run a script every time you have a failed login attempt, I could deal with that.