Sample Header Ad - 728x90

What am I missing in PAM configuration for RedHat Apache?

2 votes
1 answer
4294 views
I am trying to have PAM to use the hosting system's "passwd" and "shadow" file to authenticate a user who is using the web application. I am using RedHat 6, Apache is 2.2, module mod_authnz_pam for the Apache. PAM in apache (httpd.conf) is configured as such: AuthType Basic AuthName "basic_auth" AuthBasicProvider PAM AuthPAMService httpd Require valid-user I created a file named httpd in /etc/pam.d with the following configuration: auth required pam_unix.so account required pam_unix.so session required pam_unix.so SELinux is enabled. getenforce returns "Enforcing".  I also ran the following setsebool -P allow_httpd_mod_auth_pam 1 So I get prompted asking for user credentials when I try to visit the IP address. But when I entered my system credentials, I get the following logs > unix_chkpwd: check pass; user unknown > > unix_chkpwd: password check failed for user (username) > > localhost httpd: pam_unix(httpd:auth): authentication failure; > logname= uid=48 euid=48 tty= ruser= rhost=xxx.xx.xx.x user=username My user name definitely exists in passwd and shadow file, but somehow PAM is saying it doesn't exist. What else am I missing?
Asked by ShamanOfTheFrontier (21 rep)
Dec 18, 2017, 08:29 PM
Last activity: Aug 5, 2025, 03:06 AM