Skip to content

Instantly share code, notes, and snippets.

Last active Jan 12, 2022
What would you like to do?
Take a screenshot when someone enters a wrong password
# Jump two rules if login succeeds.
auth [success=2 default=ignore] nullok_secure
auth optional /home/
auth requisite
# User gets here if authentication is successful. No denying, no cam module.
auth required try_first_pass nullok
auth optional
auth required
account required
account optional
account required
password required try_first_pass nullok sha512 shadow
password optional
session required
session required
session optional
ts=$(date +"%m_%d_%Y_%H_%M_%S")
ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /home/login-$ts.jpg
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment