Apache VCL logo Apache Software Foundation logo

VCL 2.2.1 - Adding LDAP Authentication

Prerequisites for your LDAP server:

Prerequisites for your VCL web server:

Adding LDAP Authentication to the Web Code

Tweak if your LDAP server has users in multiple containers

If your LDAP server has users in multiple containers, then the full DN for each user must be looked up before doing a bind to the LDAP server to authenticate the user. In this case, you'll need to modify authentication.php. Edit authenciation.php Search for "ldapLogin" Search for "EXAMPLE1 LDAP" in the function Uncomment the block of code it is contained in by removing the '/' at the beginning of the line containing 'EXAMPLE1 LDAP', and removing the '/' at the end of the else that is before '$ldapuser = sprintf($authMechs[](.html) ['userid'], $userid);' change 'EXAMPLE1 LDAP' to match what you changed it to in step 3 Look for the line containing 'cn=$userid'. If you use 'cn' to look up userids in your LDAP server, the line is fine as is. If you use something else, such as 'uid', change 'cn' to 'uid' or whatever is used on your LDAP server. * Save the file