index 97571da7900f3e6d51f3190319cc0ba9508d6e64..4ebc87bb701e94479e436bd18de96dbcdf49e581 100644 (file)
class passwordMethod
{
var $config = false;
+ var $attrs= array();
// Konstructor
function passwordMethod($config)
// read current password entry for $dn, to detect the encryption Method
$ldap = $config->get_ldap_link();
- $ldap->cat ($dn, array("shadowLastChange", "userPassword"));
+ $ldap->cat ($dn, array("shadowLastChange", "userPassword", "uid"));
$attrs = $ldap->fetch ();
// Set encryption type to clear if required
$hash= strtolower($matches[1]);
}
-
// Crypt with the detected Method
$test = new $available[$hash]($config);
+ $test->attrs= $attrs;
$newpass = $test->generate_hash($password);
} else {
$hash= current($ar);
if ($hash == "")
{
- print_red (_("Setting for SMBHASH in gosa.conf is incorrect! Can't change Samba password."));
+ print_red (sprintf(_("Setting for SMBHASH in %s is incorrect! Can't change Samba password."),CONFIG_FILE));
}
else
{