Fixed problem with samba-password when setting it to unix password

This commit is contained in:
katagia 2004-02-07 11:37:36 +00:00
parent 3ef60fc18e
commit c81a51f56d
2 changed files with 1 additions and 2 deletions

View File

@ -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;

View File

@ -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