Commit 6954036c authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3458 not adding samba attributes when samba plugin is not there

parent c3665962
......@@ -3051,15 +3051,17 @@ function change_password ($dn, $password, $mode = 0, $hash = "")
// Not for groups
if ($mode == 0) {
if ($test->need_password()) {
// Create SMB Password
$attrs = generate_smb_nt_hash($password);
} else {
$attrs['sambaLMPassword'] = array();
$attrs['sambaNTPassword'] = array();
$attrs['sambaPwdLastSet'] = array();
$attrs['sambaBadPasswordCount'] = array();
$attrs['sambaBadPasswordTime'] = array();
if (class_available('sambaAccount')) {
if ($test->need_password()) {
// Create SMB Password
$attrs = generate_smb_nt_hash($password);
} else {
$attrs['sambaLMPassword'] = array();
$attrs['sambaNTPassword'] = array();
$attrs['sambaPwdLastSet'] = array();
$attrs['sambaBadPasswordCount'] = array();
$attrs['sambaBadPasswordTime'] = array();
}
}
if ($shadow != 0) {
$attrs['shadowLastChange'] = $shadow;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment