Fixed problem with samba-password when setting it to unix password
This commit is contained in:
parent
3ef60fc18e
commit
c81a51f56d
|
@ -1315,7 +1315,6 @@ function createuser($values, $uselamdaemon=true) {
|
|||
if ($values->smb_password != '') {
|
||||
$values->smb_password = $_SESSION['ldap']->decrypt(base64_decode($values->smb_password));
|
||||
}
|
||||
|
||||
// Attributes which are required
|
||||
$attr['cn'] = $values->general_username;
|
||||
$attr['uid'] = $values->general_username;
|
||||
|
|
|
@ -417,7 +417,7 @@ switch ($_POST['select']) {
|
|||
else $account_new->smb_password = '';
|
||||
if ( (($account_new->smb_useunixpwd && !$account_old) || ($account_new->smb_useunixpwd && $account_new->unix_password!='')) && isset($account_new->unix_password) ) {
|
||||
// Set Samba-Password to unix-password if option is set
|
||||
$unix_password = $_SESSION['ldap']->decrypt(base64_decode($account_new->unix_password));
|
||||
$smb_password = $_SESSION['ldap']->decrypt(base64_decode($account_new->unix_password));
|
||||
$account_new->smb_password = base64_encode($_SESSION['ldap']->encrypt($smb_password));
|
||||
}
|
||||
// Check values
|
||||
|
|
Loading…
Reference in New Issue