From c81a51f56da3eb35f83a58d42f51220e2bdc706f Mon Sep 17 00:00:00 2001 From: katagia Date: Sat, 7 Feb 2004 11:37:36 +0000 Subject: [PATCH] Fixed problem with samba-password when setting it to unix password --- lam-0.4/lib/account.inc | 1 - lam-0.4/templates/account/useredit.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lam-0.4/lib/account.inc b/lam-0.4/lib/account.inc index 1d1128b7..6ba4aa26 100644 --- a/lam-0.4/lib/account.inc +++ b/lam-0.4/lib/account.inc @@ -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; diff --git a/lam-0.4/templates/account/useredit.php b/lam-0.4/templates/account/useredit.php index 553b693a..274e4ba7 100644 --- a/lam-0.4/templates/account/useredit.php +++ b/lam-0.4/templates/account/useredit.php @@ -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