[horde] passwd error when changing password.

jochem at mondrian-it.nl jochem at mondrian-it.nl
Wed Mar 7 16:05:42 UTC 2007


Hi all,

In the latest HEAD release of Horde, I encountered an error while using
passwd. My passwd is configured to talk to a local smbldap source.

It was incapable of changing the password, saying that the entered old
password, and the password on the server don't match, even though they do.
After some digging in the code, it seems that the error originates in
passwd/lib/Driver/smbldap.php between line 144 and 152:

if (!is_null($this->_params['admindn'])) {
 print_r(array('<pre>', $this, '</pre>'));
 $ldappasswd = ldap_get_values($this->_ds, $entry,
$this->_params['attribute']);
 $result = $this->comparePasswords($ldappasswd[0], $passw);
 if (is_a($result, 'PEAR_Error')) {
  return $result;
 }
}

Even though _params['admindn'] isn't defined in passwd/conf/backends.php,
the is_null function apparently returns false, hence running the wrong block
of code. The problem was solved by adding the following line to the _params
block in backends.php:

'admindn' => NULL,

Kind Regards,

Jochem



More information about the horde mailing list