Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-19-2007, 10:49 AM   #1
Registered: Jan 2006
Posts: 65

Rep: Reputation: 15
Question 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!
Old 10-26-2007, 11:36 AM   #2
Registered: Jan 2006
Posts: 65

Original Poster
Rep: Reputation: 15
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.?
Old 10-26-2007, 01:03 PM   #3
Registered: Jan 2006
Posts: 65

Original Poster
Rep: Reputation: 15
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.
Old 01-07-2010, 08:37 AM   #4
LQ Newbie
Registered: Sep 2009
Posts: 20

Rep: Reputation: 1
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

Last edited by carters2; 01-07-2010 at 09:20 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache LDAP authentication Amuro-Ray2020 Linux - Security 5 07-28-2007 06:31 PM
ldap authentication for Apache anjani.78 Linux - Software 1 08-03-2006 04:06 AM
Apache: htpasswd error daedalus703 Linux - Software 1 04-03-2006 12:03 AM
[apache] disable htpasswd in subtrees? yapp Linux - Networking 4 01-13-2005 11:22 PM
Apache .htpasswd use windows authentication? meeshka Linux - Networking 1 07-14-2003 10:14 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration