Hi everyone,
I am trying to use a webbased groupware solution in an already existing NIS environment. The server the php-scripts are running on is already fully content with the nis setup - users can auth without problems using for example login or su.
However when I run the php script calling pam_auth as an unpriviledged user (here as webserver), the log always states that
Code:
Mar 21 03:27:10 grpwr unix_chkpwd[30335]: check pass; user unknown
Mar 21 03:27:10 grpwr unix_chkpwd[30335]: password check failed for user (<username>)
Mar 21 03:27:10 grpwr php: pam_unix(php:auth): authentication failure; logname=<logname> uid=33 euid=33 tty= ruser= rhost= user=<username>
When I run the same script as root, it works just fine.
For test purposes I have copied the /etc/pam.d/su to /etc/pam.d/php and added the option
Code:
pam.servicename = "php"
to /etc/php5/<instance>/php.ini.
Interestingly enough, when logged in as user www-data, I can still call su and become someone else. So its apparently just php that is denied access to pam.
I am kind of puzzled here. How can I get an unpriviledged user to authenticate another user using PAM?
Thanks in advance.