OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

LDAP Authentication

lanks

02-04-2012 10:37:50

I followed the guide that was posted somewhere down the forum to setup LDAP authentication, however, as soon as I switch the authtype to 'ldap' (no quotes) OpenNetAdmin fails to load completely. Here's my auth_ldap.config.php (with a few things modified for privacy):

// Common settings and debugging
$conf['auth']['ldap']['debug'] = 'true';
$conf['auth']['ldap']['version'] = '3';
$conf['auth']['ldap']['server'] = 'ldap://dc1.domain.com:389';

// Active Directory DN bind as user example
$conf['auth']['ldap']['binddn'] = '%{user}@domain.com';
$conf['auth']['ldap']['usertree'] = 'OU=IS Dept,OU=Company Users,DC=domain,DC=com';
$conf['auth']['ldap']['userfilter'] = '(sAMAccountName=%{user})';
$conf['auth']['ldap']['grouptree'] = 'OU=IS Dept,OU=Company Users,DC=domain,DC=com';
$conf['auth']['ldap']['groupfilter'] = '(&(cn=*)(Member=%{dn})(objectClass=group))';
$conf['auth']['ldap']['mapping']['grps'] = array('memberOf'=>'/cn=(.+?),/i');
$conf['auth']['ldap']['referrals'] = '0';

Matt

03-04-2012 16:43:19

If ONA does not work at all you may have forgotten to have "<?php" at the top of your auth_ldap.config.php file. It is required since it is actually php code. might be the issue? otherwise It looks pretty good to me. you might want to do an ldapsearch command from the CLI to test basic connectivity to your LDAP server from your ONA server.

This one is a hard one to diagnose since there are so many ways an ldap server schema can be set up. If you are pointing at an AD server then this should be working for you provided your OU structure is correct for your environment.

lanks

04-04-2012 11:36:45

Fixed it. The problem ended up being that I didn't have php5-ldap installed. Sorry, my Linux skills leave a lot to be desired :P