multiple auth provider in htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stucker
    New Member
    • Sep 2010
    • 2

    multiple auth provider in htaccess

    I would like to set up a .htaccess file so that visitors are first authenticated by LDAP, but if their login name is not in the LDAP directory, they are then authenticated against a .htpasswd file. I have both LDAP and .htaccess working; I just haven't found out how to combine these for the same site (if it's even possible).

    Any help would be appreciated!
  • stucker
    New Member
    • Sep 2010
    • 2

    #2
    found my own answer

    I found the answer myself. :-)

    It turns out you can include both methods on the AuthBasicProvid er line, as in:

    AuthType Basic
    AuthLDAPAuthori tative off
    AuthBasicProvid er ldap, file
    require valid-user

    followed by the appropriate AuthUserFile and AuthLDAP* lines.

    It checks LDAP first. If the login name is in LDAP, LDAP performs the authentication. If auth fails, the file is -not- consulted.

    If the login name is not in LDAP, then authentication is performed against the file.

    Comment

    Working...