Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache HTTP Server 2.4 LDAP (Active Directory) Authentication

I have installed Apache 2.4 with PHP 5.4 on a Windows 2008 Server. I am trying to authenticate against an Active Directory server. I have uncommented the following in httpd.conf

LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so

and I have created the following alias

Alias /Website "C:/Web/Aliases/Website"
<Location /Website>

# Using this to bind
AuthLDAPBindDN "CN=John Doe,OU=Accounts,OU=CA,OU=Country,OU=Company Name,DC=com"
AuthLDAPBindPassword "mypassword"
# search user
AuthLDAPURL "ldap://myserver/OU=Country,OU=Company,DC=com?poibri02?sub?(objectClass=*)"

AuthType Basic
AuthName "USE YOUR WINDOWS ACCOUNT"
AuthBasicProvider ldap
require valid-user

</Location>

However, when I try to access the website, I get a 500 Internal Server Error and the error.log give the following

[Wed Jan 09 12:05:28.614839 2013] [ldap:error] [pid 3904:tid 1064] (70023)This function has not been implemented on this platform: AH01277: LDAP: Unable to add rebind cross reference entry. Out of memory?

Any ideas as to what I'm doing wrong?

like image 840
HydroPowerDeveloper Avatar asked Oct 21 '22 20:10

HydroPowerDeveloper


1 Answers

This solved this problem for me:

LDAPReferrals Off

Other tips gathered from here and here:

AuthzLDAPAuthoritative off
# Use the password without quotes, e.g. password instead of "password"
AuthLDAPBindPassword password

However, these were not necessary for me.

like image 153
Gerald Schneider Avatar answered Oct 25 '22 17:10

Gerald Schneider