[hermes] Horde LDAP Authentication & Hermes

Wes Deviers wdeviers at wildwiresonline.com
Thu May 5 15:50:24 PDT 2005


List,

I have Horde3 set up to authenticate via LDAP using our company's active
directory server.  That is currently working; all other modules are
workign correctly, but I've hit a snag with Hermes I can't seem to
figure out.

My LDAP configuration is as follows:

BaseDN -> OU=Wildwires Staff,DC=wildwiresonline,DC=com
Version -> LDAPv3
Username Search Key -> "sAMAccountName"
How to specify filter -> "One or more Object/Class Filters"
Object/Class Filter -> "User"

As I said, this works properly for authentication as expected.  

When I load the Time Tracker, It throws one of two errors.  In one case
it reports an invalid LDAP file handle.  I think that on is fixed (minor
changes on the LDAP configuation.)  Now I have this:

Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 331

Repeated in a loop, 1 per user as would be expected (thus the loop is
working correctly.  I modified the area around 331 as follows:


	$search = ldap_search($ldap, $this->_params['basedn'], $filter,
array('uid'));
	$entries = ldap_get_entries($ldap, $search);
        $userlist = array();
        var_dump($entries);
        print ("\n");
        for ($i = 0; $i < $entries['count']; $i++) {
                var_dump($entries[$i][$this->_params['uid']][0]);
            $userlist[$i] = $entries[$i][$this->_params['uid']][0];
        }

        return $userlist;

Which gives me some somewhat-effective debugging info:

array(50) { ["count"]=> int(49) [0]=> array(2) { ["count"]=> int(0)
["dn"]=> string(71) "CN=Ford Focus,OU=Resources,OU=Wildwires
Staff,DC=wildwiresonline,DC=com" } [1]=> array(2) { ["count"]=> int(0)
["dn"]=> string(74) "CN=Ford Explorer,OU=Resources,OU=Wildwires
Staff,DC=wildwiresonline,DC=com" } [2]=> array(2) { ["count"]=> int(0)
["dn"]=> string(75) "CN=Ford Econoline,OU=Resources,OU=Wildwires
Staff,DC=wildwiresonline,DC=com" }

... 


[46]=> array(2) { ["count"]=> int(0) ["dn"]=> string(71) "CN=Matt
Perticone,OU=Other,OU=Wildwires Staff,DC=wildwiresonline,DC=com" }
[47]=> array(2) { ["count"]=> int(0) ["dn"]=> string(67) "CN=Brian
Plum,OU=Other,OU=Wildwires Staff,DC=wildwiresonline,DC=com" } [48]=>
array(2) { ["count"]=> int(0) ["dn"]=> string(67) "CN=Mary
Frier,OU=Other,OU=Wildwires Staff,DC=wildwiresonline,DC=com" } } 
Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 330
NULL 
Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 331

Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 330
NULL 
Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 331

Notice: Undefined index: sAMAccountName
in /var/www/horde/lib/Horde/Auth/ldap.php on line 330
NULL



As you can see from the NULL ouputs, 

 $entries[$i][$this->_params['uid']][0]

appears to contain nothing.

I feel like I've missed something really simple, as I'm not as familier
with LDAP as I would like.  Does anybody have any suggestions? : )


Thanks!


Wes Deviers



More information about the hermes mailing list