Skip to content

Instantly share code, notes, and snippets.

View octomike's full-sized avatar

Michael octomike

View GitHub Profile
@misterch0c
misterch0c / pamcam
Last active January 12, 2022 06:36
Take a screenshot when someone enters a wrong password
#/etc/pam.d/system-auth
#%PAM-1.0
# Jump two rules if login succeeds.
auth [success=2 default=ignore] pam_unix.so nullok_secure
auth optional pam_exec.so /home/pamcam.sh
auth requisite pam_deny.so
# User gets here if authentication is successful. No denying, no cam module.
auth required pam_unix.so try_first_pass nullok