Hardware Reference
In-Depth Information
This rule will reset the bad login counter whenever
pi
logs in successfully.
PAM configuration altered to execute custom script on failure
5.
Now all we need is the script to run on login failures. Open it up for editing:
pi@raspberrypi ~ $ sudo nano /home/slatfatf.sh
#!/bin/bash
TRIGGER_USER="phoenix"
MAXFAIL=3
COUNTFILE=/home/slatfatf.count
self_destruct() {
pkill -KILL -u pi
umount /home/pi
rm -rf /home/pi
mkhomedir_helper pi
rm -rf /home/.ecryptfs
rm -f $COUNTFILE
# rm -f /home/slatfatf.sh
}
if [ $PAM_USER == $TRIGGER_USER ]; then