Feb 162017

Logs keep telling:

Apache-Error: [file "mod_auth_basic.c"] [line 354] [level 3] AH01617: user %s: authentication failure for "%s": Password Mismatch

[Thu Feb 16 12:18:17.300693 2017] [:warn] [pid 27735] mod_authnz_pam: PAM authentication failed for user klu: Authentication failure
[Thu Feb 16 12:18:17.301584 2017] [auth_basic:error] [pid 27735] [client] AH01617: user klu: authentication failure for "/racktables/": Password Mismatch

Very annoying.
First test with pamtester:
root@regulan:/etc/httpd/conf.d# pamtester httpd klu authenticate

That worked for me. Then test as apache user:
root@regulan:/etc/httpd/conf.d# sudo -u apache pamtester httpd klu authenticate

That failed. Fix was chmodding the file in /etc/pam.d corectly:
-rw-r--r--. 1 root root 206 Feb 16 11:54 racktables

Config for setting up httpd / apache web server on centos 7 with pam auth:

root@regulan:/etc/httpd/conf.d# cat /etc/pam.d/racktables
#auth required pam_sss.so
#account required pam_sss.so
auth sufficient pam_radius_auth.so debug conf=/etc/pam_radius.conf
account sufficient pam_radius_auth.so debug conf=/etc/pam_radius.conf

root@regulan:/etc/httpd/conf.d# cat /etc/pam_radius.conf
# server[:port] shared_secret timeout (s)
auth1 notreallymysecret 2
auth2 notreallymysecret 2

 Posted by at 11:26

Sorry, the comment form is closed at this time.