So I installed pam-script
made this script:
and modified my common_auth to
#Read the card
#check if the card id my card, if so, then authenticate, if not, disallow
if [ $tag == "2800a79557" ]; then
But upon starting a terminal window and typing
# here are the per-package modules (the "Primary" block)
auth sufficient pam_script.so dir=/etc/pam-scripts/
auth sufficient pam_unix.so nullok_secure try_first_pass
It doesn't ask for my password and instantly authenticates as root!
if I run the above posted script manually, (cd into the dir and execute it), it works fine and produces the result 1 if positive and 0 if negative.
What did I do wrong?