diff --git a/lam/config/profiles/users/default.pru b/lam/config/profiles/users/default.pru index 0c428487..834c9b4f 100644 --- a/lam/config/profiles/users/default.pru +++ b/lam/config/profiles/users/default.pru @@ -5,12 +5,9 @@ unix_pwdwarn: 10 unix_pwdallowlogin: 10 unix_pwdminage: 1 unix_pwdmaxage: 180 -unix_pwdexpire_day: 1 -unix_pwdexpire_mon: 1 -unix_pwdexpire_yea: 2010 +unix_pwdexpire: 1262300400 unix_deactivated: 0 smb_password_no: 0 smb_useunixpwd: 1 -smb_pwdcanchange: 1 -smb_pwdmustchange: 0 +smb_flagsD: 1 smb_homedrive: U: diff --git a/lam/lib/profiles.inc b/lam/lib/profiles.inc index 151a8018..7eac0a64 100644 --- a/lam/lib/profiles.inc +++ b/lam/lib/profiles.inc @@ -80,7 +80,7 @@ function getHostProfiles() { // loads an user profile with name $profile (without .pru) // the return value is an account object // if $timestamps is true, smb_pwdcanchange and smb_pwdmustchange are returned as timestamp -function loadUserProfile($profile, $timestamps=True) { +function loadUserProfile($profile) { if (!eregi("^([0-9]|[a-z]|-|_)*$", $profile)) exit; $acc = new account(); $file = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/users/" . $profile . ".pru"; @@ -147,14 +147,6 @@ function loadUserProfile($profile, $timestamps=True) { $acc->smb_flagsD = chop(substr($line, 12, strlen($line)-12)); continue; } - if (substr($line, 0, 18) == "smb_pwdcanchange: ") { - $acc->smb_pwdcanchange = chop(substr($line, 18, strlen($line)-18)); - continue; - } - if (substr($line, 0, 19) == "smb_pwdmustchange: ") { - $acc->smb_pwdmustchange = chop(substr($line, 19, strlen($line)-19)); - continue; - } if (substr($line, 0, 15) == "smb_homedrive: ") { $acc->smb_homedrive = chop(substr($line, 15, strlen($line)-15)); continue; @@ -181,11 +173,6 @@ function loadUserProfile($profile, $timestamps=True) { } } fclose($file); - // set timestamps if needed - if ($timestamps) { - $acct->smb_pwdcanchange = ($acct->smb_pwdcanchange * 86400) + time(); - $acct->smb_pwdmustchange = ($acct->smb_pwdmustchange * 86400) + time(); - } } else { StatusMessage("ERROR", "", _("Unable to load profile! ") . $file); @@ -279,8 +266,6 @@ function saveUserProfile($account, $profile) { if (isset($account->smb_password_no)) fputs($file, "smb_password_no: " . $account->smb_password_no . "\n"); if (isset($account->smb_useunixpwd)) fputs($file, "smb_useunixpwd: " . $account->smb_useunixpwd . "\n"); if (isset($account->smb_flagsD)) fputs($file, "smb_flagsD: " . $account->smb_flagsD . "\n"); - if (isset($account->smb_pwdcanchange)) fputs($file, "smb_pwdcanchange: " . $account->smb_pwdcanchange . "\n"); - if (isset($account->smb_pwdmustchange)) fputs($file, "smb_pwdmustchange: " . $account->smb_pwdmustchange . "\n"); if (isset($account->smb_homedrive)) fputs($file, "smb_homedrive: " . $account->smb_homedrive . "\n"); if (isset($account->smb_scriptPath)) fputs($file, "smb_scriptPath: " . $scriptPath . "\n"); if (isset($account->smb_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n"); diff --git a/lam/templates/profedit/profilecreate.php b/lam/templates/profedit/profilecreate.php index 75d3e727..84de80c7 100644 --- a/lam/templates/profedit/profilecreate.php +++ b/lam/templates/profedit/profilecreate.php @@ -161,22 +161,6 @@ if ($_GET['type'] == "user") { echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!$_POST['smb_pwdcanchange'] || is_numeric($_POST['smb_pwdcanchange'])) { - $acct->smb_pwdcanchange = $_POST['smb_pwdcanchange']; - } - else { - StatusMessage("ERROR", "", _("Wrong parameter for Samba option: user can change password!") . " " . $_POST['smb_pwdcanchange']); - echo ("

" . _("Back to Profile Editor") . ""); - exit; - } - if (!$_POST['smb_pwdmustchange'] || is_numeric($_POST['smb_pwdmustchange'])) { - $acct->smb_pwdmustchange = $_POST['smb_pwdmustchange']; - } - else { - StatusMessage("ERROR", "", _("Wrong parameter for Samba option: user must change password!") . " " . $_POST['smb_pwdmustchange']); - echo ("

" . _("Back to Profile Editor") . ""); - exit; - } if ($_POST['smb_homedrive'] && ereg("^[D-Z]:$", $_POST['smb_homedrive'])) { $acct->smb_homedrive = $_POST['smb_homedrive']; } diff --git a/lam/templates/profedit/profileuser.php b/lam/templates/profedit/profileuser.php index a6cae8c2..b140b713 100644 --- a/lam/templates/profedit/profileuser.php +++ b/lam/templates/profedit/profileuser.php @@ -55,7 +55,7 @@ for ($i = 0; $i < sizeof($shelllist); $i++) { // check if profile should be edited if ($_GET['edit']) { - $acct = loadUserProfile($_GET['edit'], False); + $acct = loadUserProfile($_GET['edit']); } // search available groups @@ -244,24 +244,6 @@ echo ("\n"); echo ("" . _("Help") . "\n"); echo ("\n"); -// user can change his password -echo ("\n"); -echo ("" . _("User can change password") . ": \n"); -echo ("\n"); -echo ("smb_pwdcanchange . "\">\n"); -echo ("\n"); -echo ("" . _("Help") . "\n"); -echo ("\n"); - -// user must change his password -echo ("\n"); -echo ("" . _("User must change password") . ": \n"); -echo ("\n"); -echo ("smb_pwdmustchange . "\">\n"); -echo ("\n"); -echo ("" . _("Help") . "\n"); -echo ("\n"); - // empty row echo ("   \n");