FreeBSD 8.2 + Apache 2.2 + mod_auth_pam2: unable to authenticate

Posted by zneak on Server Fault See other posts from Server Fault or by zneak
Published on 2011-06-21T22:30:40Z Indexed on 2011/06/22 0:25 UTC
Read the original article Hit count: 459

Filed under:
|
|

I've installed Apache 2.2 and mod_auth_pam2 from ports, but I can't get local UNIX authentication to work. When I access the protected part of my local website, I do get the authentication request, and with pam_permit.so, it works. However, when I change pam_permit.so to the real thing, pam_unix.so, I get this message in httpd-error.log:

[error] PAM: user 'foo' - not authenticated: authentication error

This is the relevant part of my Apache config, though I don't think it's the problem as it works with pam_permit.so:

<Location /foo>
    AuthBasicAuthoritative Off
    AuthPAM_Enabled on
    AuthPAM_FallThrough off
    AuthType Basic
    AuthName "Secret place"
    Require valid-user
</Location>

This is my /etc/pam.d/httpd, though I don't think it's the problem either, since it works with pam_permit.so:

auth    required    pam_unix.so
account required    pam_unix.so

So what am I missing? What does it take to have pam_unix.so work for httpd under FreeBSD?

© Server Fault or respective owner

Related posts about apache

Related posts about freebsd