Hi, I've been trying to get this software to work but can't quite get there. Most of the examples/readme files are old.
Am I understanding how it works correctly?
The basic idea is to write a script that returns 0 or 1. If 0 then allow access. If 1 (or not 0) then deny access.
So the script name is based on what part of PAM you want to run against (auth, account, password, or session).
For CentOS7, if I wanted to use 'auth' I'm placing this file in /etc/pam-script.d/ and naming it pam_script_auth.
Then in /etc/pam.d/sshd (for example) I'm adding a line:
auth required pam_script.so
I now expect that when someone logs in via ssh that the /etc/pam-script.d/pam_script_auth will run and return a 0 or 1. If 0, then allow ssh acces. If 1, then deny ssh access.
Is this how it's supposed to work? Thanks for the help.