https://gitlab.com/mtekman/PAM-curses-warning-formatter
An interactive curses application that threatens to format your disks upon the three failed login attempts at boot via PAM, complete with customizable fail messages.
Edit custom_fail_messages.txt to your own preferred text produced in order of each incorrect login attempt. Emphasis is given by surrounding words in brackets, and newlines are inserted at each adjacent string.
e.g "[This] is" "YOUR FINAL WARNING" "BURN ALL YOUR [CLASSIFIED DOCUMENTS]"
will resolve to:
This is
YOUR FINAL WARNING
BURN ALL YOUR CLASSIFIED DOCUMENTS
Run install.sh
which calls scripts/{buildInstallPamScript.sh, buildWarner.sh, buildOnAuth.sh}, then copies all configs over to root directories.
Specifically:
-
buildInstallPamScript.sh
builds and copies pam_script.so into /lib/security/ -
buildWarner.sh
builds and copies the interactive warner to configs/etc/security/warner -
buildOnAuth.sh
generates and inserts custom messages into configs/etc/security/onauth
Attempt to login from a tty (not vtty) and input incorrect credentials 3 times in a row.
NOTE: It does not actually format your machine, merely frightens unsuspecting users.