I want to get my MacBook to automatically execute a shell script if the password at lock screen is entered wrong 3 times to restart the computer. Writing the script is easy enough, but how can I make it trigger automatically with a number of failed log-in attempts?
I'm using OS X 10.11.