How to troubleshoot LDAP authentication problems using Red Hat Enterprise Linux 7/8/9 and Apache 2.4?
Issue
I'm trying to authenticate users sessions using Red Hat Enterprise Linux 7/8/9, Apache 2.4 with mod_ldap against an Active Directory. The same configuration works on Red Hat Enterprise Linux 6 and Apache 2.2. works correctly.
The error message the log shows is:
AH01695: auth_ldap authenticate: user account authentication failed; URI /some/protected/place [LDAP: ldap_simple_bind() failed][Can't contact LDAP server].
The httpd.conf for that location is like this:
<Location /some/protected/place>
AuthType Basic
AuthBasicProvider ldap
AuthBasicAuthoritative on
AuthName "Location description"
AuthLDAPURL "ldap:///ldapserver.example.com:389/OU=org,DC=example,DC=com(objectClass=*)" NONE
AuthLDAPBindDN "CN=user,OU=org,DC=example,DC=com"
AuthLDAPBindPassword "password"
Require ldap-group CN=groupname,OU=Groups,DC=example,DC=com
Require valid-user
</Location>
Environment
- Red Hat Enterprise Linux (RHEL) 7, 8, and 9
- Apache httpd 2.4 with mod_ldap
- Active Directory
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.