[sork] passwd H4 using findUserDN($user) with Ldap driver

Maciej Uhlig maciej.uhlig at us.edu.pl
Tue Jan 3 10:08:36 UTC 2012


W dniu 2012-01-03 10:14, Jan Schneider pisze:
>
> Zitat von Maciej Uhlig <maciej.uhlig at us.edu.pl>:
>
>> I need to use findUserDN($user) in order to get user DN (the 
>> workaround proposed is not enough).
>>
>> I found an inconsistency while defining parameters for finduserDN(). 
>> In /pear/php/Horde/Ldap.php configuration parameter named 'user' must 
>> contain 'uid', and 'filter' or 'objectclass' entries. This parameter 
>> must then be an array. If I define this array in the script code LDAP 
>> password change works correctly.
>>
>> However, if I define this array in backends.local.php config file I 
>> get the error: "Password module is not properly configured". Looks 
>> like there are string variables 'uid' and 'filter' in the file but 
>> array 'user' is not accepted.
>>
>> Is this a bug or misconfiguration?
>
> I'm not sure what you mean. Can you show a real-world example?

Here you are:

- as we need to get user's DN, in /passwd/lib/Driver/ldap.php we make a 
following change in order to use findUserDN():

             // @todo Fix finding the user DN.
             $this->_userdn = $this->_ldap->findUserDN($username);
             // workaround
             // $this->_userdn = $this->_params['uid'] . '=' . $username 
. ',' . $this->_params['basedn'];

- in /pear/php/Horde/Ldap.php in findUserDN() we have 
$this->_config['user']['uid'] which is the element of the following 
(locally defined in script code) array:

'user'            => array('uid' => 'mail', 'filter' => 
'(&(objectclass=VirtualMailAccount)(accountActive=TRUE))'),

- and in the above configuration user DN is returned correctly.

-- however, in /passwd/config/backends.local.php, 'params' array needs 
'uid' => mail element, and the above 'user' array is not accepted: we 
get error: "... not properly configured".

The inconsistency to be fixed is between:

/pear/php/Horde/Ldap.php where

      * - user:           configuration parameters for {@link findUserDN()},
      *                   must contain 'uid', and 'filter' or 'objectclass'
      *                   entries.

and

/passwd/config/backends.local.php where 'user' is not expected.

Best regards,

MU


-- 
Maciej Uhlig
kierownik Działu Administracji Sieci i Usług Sieciowych
główny specjalista
Uniwersytet Śląski
ul. Uniwersytecka 4, 40-007 Katowice, tel. 32 359 1768



More information about the sork mailing list