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

Fixes: #2216 option to disable sambaLMPassword

Showing with 6 additions and 1 deletion
+6 -1
...@@ -3283,8 +3283,13 @@ function change_password ($dn, $password, $mode = 0, $hash = "") ...@@ -3283,8 +3283,13 @@ function change_password ($dn, $password, $mode = 0, $hash = "")
*/ */
function generate_smb_nt_hash($password) function generate_smb_nt_hash($password)
{ {
global $config;
$smbHash = new smbHash(); $smbHash = new smbHash();
$attrs['sambaLMPassword'] = $smbHash->lmhash($password); if ($config->get_cfg_value("sambaGenLMPassword", "FALSE") == "TRUE") {
$attrs['sambaLMPassword'] = $smbHash->lmhash($password);
} else {
$attrs['sambaLMPassword'] = array();
}
$attrs['sambaNTPassword'] = $smbHash->nthash($password); $attrs['sambaNTPassword'] = $smbHash->nthash($password);
$attrs['sambaPwdLastSet'] = date('U'); $attrs['sambaPwdLastSet'] = date('U');
......
  • bmortier @bmortier

    mentioned in issue #759

    By zarya on 2017-09-02T14:58:06 (imported from GitLab)

    ·

    mentioned in issue #759

    By zarya on 2017-09-02T14:58:06 (imported from GitLab)

    Toggle commit list
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