I am trying to find a way to perform PAM authentication through a PHP script. So basicly PAM calls PHP script to see if the user is correct and returns a result. How would I go about this ?
Printable View
I am trying to find a way to perform PAM authentication through a PHP script. So basicly PAM calls PHP script to see if the user is correct and returns a result. How would I go about this ?
Hi,
I've never done this myself w/PHP (did it w/Perl CGI, but that's a little different in execution - though similar in system design). anyway, look into the posix_getpwnam PHP function. The following PHP article explains it, and has some user-contributed examples, as well:
PHP: posix_getpwnam - Manual