-   Linux - Software (
-   -   apache ldap authentication with htpasswd (

laggerific 10-19-2007 10:49 AM

apache ldap authentication with htpasswd
I'm running Apache 2.0 and am attempting to use LDAP authentication along with htpasswd authentication. For some reason on my dev area it appears to be working okay, but on my production instance this same stuff is messed up.

Here is the conf.d file for the location:

<Location /svn>
DAV svn
SVNParentPath /svnroot
# Require SSL connection for password protection.
# SSLRequireSSL
AuthLDAPAuthoritative off
AuthUserFile /svn-auth-file
AuthType Basic
AuthName "SVN"
AuthLDAPBindDN "LDAPbindinfo"
AuthLDAPBindPassword "password"
AuthLDAPURL "url"
Require valid-user

When I try to do an LDAP auth I get the following error:

[Fri Oct 19 08:27:29 2007] [error] [client x.x.x.x] user xxxxxx not found: /svn

It's as if it is completely ignoring the LDAP authentication. I know that LDAP is working, because if I comment out the "AuthUserFile" statement ldap works, but if I have it in there, only auth against the htpasswd file is functional, and I don't see any errors related to LDAP auth, just that it can't file the user in the directory. I don't see any differences between the httpd.conf between the two systems either.

Any ideas what might be happening here?

Thank you!

laggerific 10-26-2007 11:36 AM

Just giving this issue a bump, as I now have time to continue researching this issue...hoping someone else might have some insights into this sort of behavior.

Any reason why the same config would be working in the dev env. but not in the prod env.?

laggerific 10-26-2007 01:03 PM

I literally copied the httpd.conf and the conf.d conf file used on the prod system to dev, and it worked fine.

It's not like LDAP doesn't work on the prod system, it really seems like it should be a configuration issue, yet I don't see how with the test I just did.

carters2 01-07-2010 08:37 AM

Did you ever come up with a solution for this? I have been trying to do the same thing with no success


I realize this is a stale post but here is the solution

<Location /svn/ngoerepos>
DAV svn
SVNPath /apps/svn/ngoerepos

AuthName "NGOE Subversion LDAP & HTPASSWD"
#AuthzSVNAccessFile /etc/httpd/conf/svn/access_file
AuthType Basic

AuthzLDAPUserBase "OU=Users,DC=mydomain,DC=com"
AuthzLDAPBindDN "CN=svn_user,OU=UsersDC=mydomain,DC=com"
AuthzLDAPBindPassword "4UfaxAsp"
AuthzLDAPUserKey sAMAccountName
AuthzLDAPUserScope subtree
AuthzLDAPMethod ldap
AuthzLDAPAuthoritative off

AuthUserFile /etc/httpd/conf/svn/svn_user_file
AuthBasicAuthoritative off

Require valid-user

This allows you to either authenticate with ldap or htpasswd. They key directives are in red

All times are GMT -5. The time now is 01:45 PM.