Wednesday, May 11, 2016

Apache mod_authnz_ldap: syntax for AuthLDAPBindDN Directive

When configuring authentication for Apache against Active Directory, one may have to specify value for AuthLDAPBindDN.
Apache documentation here http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html#authldapbinddn does not mention about the syntax of this setting. Most of people will think of a DN string like "CN=,OU=,DC=my,DC=company,DC=com". 
But that's not the case.
The syntax should be: userid@MY.COMPANY.COM

Note that the realm here should be in all uppercase.