Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .