1

I'm attempting to use LDAP authentication alongside regular .htpasswd authentication, i.e., a user may use a valid LDAP user/pass OR one of the user/passes in .htaccess.

The LDAP login is working fine, however I can't seem to get the .htaccess working alongside.

<Files test.html>
AuthName "Enter either your LDAP username or special username"
AuthType Basic
AuthBasicProvider file
AuthUserFile /path/to/.htpasswd
AuthzLDAPAuthoritative off
AuthBasicProvider ldap
AuthLDAPUrl ldap://authurl.com/o=Personnel,dc=test
Require ldap-attribute objectClass=testClass
</Files>

What am I doing wrong here?

  • 1
    Never needed to do this myself, but don't you need 'Require valid-user' for HTTP-Basic authentication to be accepted? Dunno how you'd OR that together with 'Require ldap-attribute [...]', but this Apache manual page seems to suggest that an implied OR occurs, so you might just be able to add 'Require valid-user' and get away with it. – Aaron Miller Oct 8 '12 at 23:29
  • Thanks! Adding 'Require valid-user' before </Files> was all that was needed :-) – idea Oct 9 '12 at 0:17
  • Try a Satisfy Any. – Zoredache Oct 9 '12 at 2:13
2

AuthBasicProvider file

I never put it, and works anyway. Try deleting. Let only AuthBasicProvider for LDAP.

I say this because i try use twice htaccess at time and "Internal 500 error" comes on when I repeat AuthUserFile.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.