diff --git a/lam-0.4/templates/confwiz/final.php b/lam-0.4/templates/confwiz/final.php new file mode 100644 index 00000000..bf3dd756 --- /dev/null +++ b/lam-0.4/templates/confwiz/final.php @@ -0,0 +1,65 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + + +echo $_SESSION['header']; + +echo "" . _("Configuration wizard") . "\n"; +echo "\n"; +echo "\n"; + +echo ("

". + "\"LDAP




\n"); +echo ("" . _("The following settings were saved to profile:") . " " . $_SESSION['confwiz_config']->file . "

"); + +$_SESSION['confwiz_config']->printconf(); +echo ("




" . _("Back to Login") . ""); + +echo(""); + + +// remove config wizard settings +unset($_SESSION['confwiz_config']); +unset($_SESSION['confwiz_ldap']); +unset($_SESSION['confwiz_masterpwd']); + +?> diff --git a/lam-0.4/templates/confwiz/ldaptest.php b/lam-0.4/templates/confwiz/ldaptest.php new file mode 100644 index 00000000..dc748746 --- /dev/null +++ b/lam-0.4/templates/confwiz/ldaptest.php @@ -0,0 +1,576 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// check if user clicked cancel button +if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); +} + +// check if all suffixes exist +$conf = $_SESSION['confwiz_config']; +$new_suffs = array(); +if ($conf->get_UserSuffix() && ($conf->get_UserSuffix() != "")) { + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_UserSuffix(), "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if (!$res && !in_array($conf->get_UserSuffix(), $new_suffs)) $new_suffs[] = $conf->get_UserSuffix(); +} +if ($conf->get_GroupSuffix() && ($conf->get_GroupSuffix() != "")) { + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_GroupSuffix(), "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if (!$res && !in_array($conf->get_GroupSuffix(), $new_suffs)) $new_suffs[] = $conf->get_GroupSuffix(); +} +if ($conf->get_HostSuffix() && ($conf->get_HostSuffix() != "")) { + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_HostSuffix(), "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if (!$res && !in_array($conf->get_HostSuffix(), $new_suffs)) $new_suffs[] = $conf->get_HostSuffix(); +} +if ($conf->is_samba3() && $conf->get_DomainSuffix() && ($conf->get_DomainSuffix() != "")) { + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_DomainSuffix(), "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if (!$res && !in_array($conf->get_DomainSuffix(), $new_suffs)) $new_suffs[] = $conf->get_DomainSuffix(); +} + +if (sizeof($new_suffs) > 0) { + // check if user wanted to create suffixes + if ($_POST['createsuff']) { + $fail = array(); + $errors = array(); + // add entries + for ($i = 0; $i < sizeof($new_suffs); $i++) { + // check if entry is already present + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $new_suffs[$i], "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if ($res) continue; + $suff = $new_suffs[$i]; + // generate DN and attributes + $tmp = explode(",", $suff); + $name = explode("=", $tmp[0]); + array_shift($tmp); + $end = implode(",", $tmp); + if ($name[0] != "ou") { // add root entry + $attr = array(); + $attr[$name[0]] = $name[1]; + $attr['objectClass'] = 'organization'; + $dn = $suff; + if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) { + $fail[] = $suff; + continue; + } + } + else { // add organizational unit + $name = $name[1]; + $attr = array(); + $attr['objectClass'] = "organizationalunit"; + $attr['ou'] = $name; + $dn = $suff; + if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) { + // check if we have to add parent entries + if (ldap_errno($_SESSION['confwiz_ldap']->server()) == 32) { + $temp = explode(",", $suff); + $subsuffs = array(); + // make list of subsuffixes + for ($k = 0; $k < sizeof($temp); $k++) { + $part = explode("=", $temp[$k]); + if ($part[0] == "ou") $subsuffs[] = implode(",", array_slice($temp, $k)); + else { + $subsuffs[] = implode(",", array_slice($temp, $k)); + break; + } + } + // create missing entries + for ($k = sizeof($subsuffs) - 1; $k >= 0; $k--) { + // check if subsuffix is present + $info = @ldap_search($_SESSION['confwiz_ldap']->server, $subsuffs[$k], "", array()); + $res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info); + if (!$res) { + $suffarray = explode(",", $subsuffs[$k]); + $headarray = explode("=", $suffarray[0]); + if ($headarray[0] == "ou") { // add ou entry + $attr = array(); + $attr['objectClass'] = 'organizationalunit'; + $attr['ou'] = $headarray[1]; + $dn = $subsuffs[$k]; + if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) { + $fail[] = $suff; + $error[] = ldap_error($_SESSION['confwiz_ldap']->server()); + break; + } + } + else { // add root entry + $attr = array(); + $attr['objectClass'] = 'organization'; + $attr[$headarray[0]] = $headarray[1]; + $dn = $subsuffs[$k]; + if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) { + $fail[] = $suff; + $error[] = ldap_error($_SESSION['confwiz_ldap']->server()); + break; + } + } + } + } + } + else { + $fail[] = $suff; + $error[] = ldap_error($_SESSION['confwiz_ldap']->server()); + } + } + } + } + // show errors + if (sizeof($fail) > 0) { + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + // print failed suffixes + for ($i = 0; $i < sizeof($fail); $i++) { + StatusMessage("ERROR", _("Failed to create entry!") . "
" . $error[$i], $fail[$i]); + } + echo "

 

\n"; + echo "



" . _("Back to server settings") . "

\n"; + echo "\n"; + exit; + } + } + // show needed suffixes + else { + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + echo "

" . _("The following suffix(es) are missing in LDAP. LAM will create them for you.") . "

\n"; + echo "

 

\n"; + // print missing suffixes + for ($i = 0; $i < sizeof($new_suffs); $i++) { + echo "

" . $new_suffs[$i] . "

\n"; + } + echo "

 

\n"; + echo "
\n"; + echo ""; + echo ""; + echo "
\n"; + echo "\n"; + exit; + } +} + +// check if domain object is present +if ($_SESSION['confwiz_config']->is_samba3()) { + // get list of domains + $domlist = $_SESSION['confwiz_ldap']->search_domains($_SESSION['confwiz_config']->get_domainSuffix()); + if (sizeof($domlist) < 1) { + if ($_POST['createdom']) { + // check input + $suffix = $_SESSION['confwiz_config']->get_DomainSuffix(); + $server = $_SESSION['confwiz_ldap']->server; + $filter = "(|(sambasid=" . $_POST['dom_SID'] . ")(sambadomainname=" . $_POST['dom_name'] . "))"; + $sr = @ldap_search($server, $suffix, $filter, array()); + $info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr); + $errors = array(); + // check for existing domains + if ($info["count"] > 0) { + $errors[] = _("This Samba 3 domain is already present!"); + } + // check domain name + if (!eregi("^[a-z0-9_\\-]+$", $_POST['dom_name'])) { + $errors[] = _("Domain name is invalid!"); + } + // check SID + if (!eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]*$", $_POST['dom_SID'])) { + $errors[] = _("Samba 3 domain SID is invalid!"); + } + // check numbers + if ($_POST['dom_nextRID'] && !is_numeric($_POST['dom_nextRID'])) { + $errors[] = _("Next RID is not a number!"); + } + if ($_POST['dom_nextUserRID'] && !is_numeric($_POST['dom_nextUserRID'])) { + $errors[] = _("Next user RID is not a number!"); + } + if ($_POST['dom_nextGroupRID'] && !is_numeric($_POST['dom_nextGroupRID'])) { + $errors[] = _("Next group RID is not a number!"); + } + if (!is_numeric($_POST['dom_RIDbase'])) { + $errors[] = _("Algorithmic RID base is not a number!"); + } + // try to create domain if no error occured + if (sizeof($errors) < 1) { + $DN = "sambaDomainName" . "=" . $_POST['dom_name'] . "," . $_POST['dom_suffix']; + $attr = array(); + $attr['objectclass'] = "sambaDomain"; + $attr['sambaDomainName'] = $_POST['dom_name']; + $attr['sambaSID'] = $_POST['dom_SID']; + if ($_POST['dom_nextRID']) $attr['sambaNextRid'] = $_POST['dom_nextRID']; + if ($_POST['dom_nextGroupRID']) $attr['sambaNextGroupRid'] = $_POST['dom_nextGroupRID']; + if ($_POST['dom_nextUserRID']) $attr['sambaNextUserRid'] = $_POST['dom_nextUserRID']; + $attr['sambaAlgorithmicRidBase'] = $_POST['dom_RIDbase']; + // write to LDAP + if (! @ldap_add($_SESSION['confwiz_ldap']->server(), $DN, $attr)) { + $errors[] = _("Failed to add domain!") . "\n
" . ldap_error($_SESSION['confwiz_ldap']->server()); + } + else { + // remember domain SID + $_SESSION["confwiz_domainsid"] = $_POST['dom_SID']; + } + } + // show error messages + if (sizeof($errors) > 1) { + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + // print errors + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "

 

\n"; + echo "



" . _("Back to server settings") . "

\n"; + echo "\n"; + exit; + } + } + else { + // get possible suffixes + $domsuff = $_SESSION['confwiz_ldap']->search_units($_SESSION['confwiz_config']->get_domainSuffix()); + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + echo "

". _("No domains found, please create one.") . "

\n"; + echo "

 

\n"; + echo "
\n"; + echo "
\n"; + echo "" . _("Domain Settings") . "\n"; + echo "\n"; + // domain name + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // domain SID + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // next RID + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + // next user RID + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + // next group RID + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // algorithmic RID base + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // domain suffix + echo "\n"; + echo "\n"; + echo "\n"; + echo ("\n"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "" . _("Domain name") . ":\n"; + echo "\n"; + echo "\n"; + echo "" . _("Help") . "
  
\n"; + echo "" . _("Domain SID") . ": \n"; + echo "\n"; + echo "\n"; + echo "" . _("Help") . "
  
" . _("Next RID") . " " . _("(optional)") . ": \n"; + echo "\n"; + echo "" . _("Help") . "
" . _("Next User RID") . " " . _("(optional)") . ": \n"; + echo "\n"; + echo "" . _("Help") . "
" . _("Next Group RID") . " " . _("(optional)") . ": \n"; + echo "\n"; + echo "" . _("Help") . "
  
" . _("Algorithmic RID Base") . ": \n"; + echo "\n"; + echo "" . _("Help") . "
  
\n"; + echo "" . _("Suffix") . ": \n"; + echo "\n"; + echo ""; + echo "" . _("Help") . "
  
\n"; + echo "
\n"; + echo "

 

\n"; + echo ""; + echo ""; + echo "
\n"; + echo "\n"; + exit; + } + } + else { + // remember domain SID + $_SESSION["confwiz_domainsid"] = $domlist[0]->SID; + } +} + + +// check if essential default Samba groups are present +if ($_SESSION['confwiz_config']->is_samba3() && !$_POST['creategroups'] && !$_POST['ignoregroups']) { + $d512 = $d513 = $d514 = false; + $suffix = $_SESSION['confwiz_config']->get_groupSuffix(); + $domSID = $_SESSION['confwiz_domainsid']; + $filter = "(objectclass=sambagroupmapping)"; + $server = $_SESSION['confwiz_ldap']->server; + $sr = @ldap_search($server, $suffix, $filter, array("sambaSID")); + if ($sr) { + $info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr); + if ($info) { + // check SIDs + array_shift($info); + for ($i = 0; $i < sizeof($info); $i++) { + if ($info[$i]['sambasid']['0'] == $domSID . "-512") { + $d512 = true; + } + elseif ($info[$i]['sambasid']['0'] == $domSID . "-513") { + $d513 = true; + } + elseif ($info[$i]['sambasid']['0'] == $domSID . "-514") { + $d514 = true; + } + } + } + } + // make a list of missing groups + $missing_groups = array(); + if (!$d512) { + $temp = array(); + $temp['sambasid'] = $domSID . "-512"; + $temp['displayname'] = "Domain Admins"; + $temp['cn'] = "domainadmins"; + $missing_groups[] = $temp; + } + if (!$d513) { + $temp = array(); + $temp['sambasid'] = $domSID . "-513"; + $temp['displayname'] = "Domain Users"; + $temp['cn'] = "domainusers"; + $missing_groups[] = $temp; + } + if (!$d514) { + $temp = array(); + $temp['sambasid'] = $domSID . "-514"; + $temp['displayname'] = "Domain Guests"; + $temp['cn'] = "domainguests"; + $missing_groups[] = $temp; + } + $_SESSION['conwiz_missing_groups'] = $missing_groups; + if (sizeof($missing_groups) > 0) { + // show user a list of missing groups + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + echo "

" . _("LAM detected that one or more essential Samba groups are missing. They are listed below.") . + " " . _("LAM can create them for you or you have to create them manually later.") . "

\n"; + echo "

 

\n"; + for ($i = 0; $i < sizeof($missing_groups); $i++) { + echo "

" . _("Windows group name") . ": " . $missing_groups[$i]['displayname'] . "

\n"; + echo "

" . _("Unix group name") . ": " . $missing_groups[$i]['cn'] . "

\n"; + echo "

" . _("Group SID") . ": " . $missing_groups[$i]['sambasid'] . "

\n"; + echo "

 

\n"; + echo "

 

\n"; + } + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo "
\n"; + echo "\n"; + exit; + } +} + +// create needed Samab groups +if ($_SESSION['confwiz_config']->is_samba3() && $_POST['creategroups']) { + $suffix = $_SESSION['confwiz_config']->get_groupSuffix(); + $domSID = $_SESSION['confwiz_domainsid']; + $filter = "(objectclass=posixgroup)"; + $server = $_SESSION['confwiz_ldap']->server; + $sr = @ldap_search($server, $suffix, $filter, array("gidnumber")); + if ($sr) { + $info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr); + if ($info) { + array_shift($info); + // create list of GID numbers + $gid_numbers = array(); + for ($i = 0; $i < sizeof($info); $i++) { + // ignore GIDs that are out of range + if ($info[$i]['gidnumber'][0] <= $_SESSION['confwiz_config']->get_maxGID()) { + if ($info[$i]['gidnumber'][0] >= $_SESSION['confwiz_config']->get_minGID()) { + $gid_numbers[] = $info[$i]['gidnumber'][0]; + } + } + } + // if no GIDs are used add (minGID -1) + if (sizeof($gid_numbers) < 1) $gid_numbers[] = $_SESSION['confwiz_config']->get_minGID() - 1; + sort($gid_numbers); + $missing_groups = $_SESSION['conwiz_missing_groups']; + $errors = array(); + // check if free GID numbers exist + if ($gid_numbers[sizeof($gid_numbers) - 1] < $_SESSION['confwiz_config']->get_maxGID() - 3) { + $gidnumber = $gid_numbers[sizeof($gid_numbers) - 1]; + for ($i = 0; $i < sizeof($missing_groups); $i++) { + $gidnumber++; + $attributes = array(); + $attributes['objectclass'][] = 'posixGroup'; + $attributes['objectclass'][] = 'sambaGroupMapping'; + $attributes['sambaGroupType'] = 2; + $attributes['gidnumber'] = $gidnumber; + $attributes['sambaSID'] = $missing_groups[$i]['sambasid']; + $attributes['description'] = $missing_groups[$i]['displayname']; + $attributes['displayname'] = $missing_groups[$i]['displayname']; + $attributes['cn'] = $missing_groups[$i]['cn']; + $dn = 'cn=' . $attributes['cn'] . ',' . $_SESSION['confwiz_config']->get_groupSuffix(); + if (!ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attributes)) { + $errors[] = 'Unable to create group:' . " " . $missing_groups[$i]['cn']; + } + } + } + // not enough free GIDs + else { + $errors[] = 'There are not enough free GID numbers in the GID range!'; + } + if (sizeof($errors) < 1) { + metarefresh('final.php'); + } + else { + echo $_SESSION['header']; + echo ""; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + echo "

 

\n"; + // print errors + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ''); + } + echo "

 

\n"; + echo "



" . _("Back to server settings") . "

\n"; + echo "\n"; + exit; + } + } + } + exit; +} + +// if nothing is missing go to last page +metarefresh('final.php'); + +?> diff --git a/lam-0.4/templates/confwiz/o_daemon.php b/lam-0.4/templates/confwiz/o_daemon.php new file mode 100644 index 00000000..ad7e6390 --- /dev/null +++ b/lam-0.4/templates/confwiz/o_daemon.php @@ -0,0 +1,155 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// check if user clicked on cancel button +if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + exit; +} + +// check if user clicked on next button +if ($_POST['submit']) { + $errors = array(); + if (!$_SESSION['confwiz_config']->set_scriptpath($_POST['scriptpath'])) { + $errors[] = _("Script path is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_scriptserver($_POST['scriptserver'])) { + $errors[] = _("Script server is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_pdftext($_POST['pdf_usertext'])) { + $errors[] = _("Saving PDF text failed!"); + } + // if no errors save and go back to optional.php + if (sizeof($errors) < 1) { + $_SESSION['confwiz_config']->save(); + $_SESSION['confwiz_optional']['daemon'] = 'done'; + metarefresh('optional.php'); + } + else { + // errors occured + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "



" . _("Back to lamdaemon and PDF settings.") . "

\n"; + echo "\n"; + exit; + } +} + + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

 

\n"; + +// lamdaemon + echo "

" . _("If you want to manage quotas and homedirectories with LAM you need to setup lamdaemon.pl.") . + "

" . + _("This is the server and path where the lamdaemon.pl script is stored. LDAP Account Manager will make a SSH connection to this server with username and password provided at login.") . + "

" . _("Use it at your own risk and read the documentation for lamdaemon before you use it!") . "

\n"; + + echo (""); + +echo ("". + "\n"); +echo ("\n"); +echo ("". + "\n"); +echo ("\n"); + + echo "
". + _("Server of external script") . ": get_scriptServer() . "\">
". + _("Path to external script") . ": get_scriptPath() . "\">
\n"; + + echo "


\n"; + +// PDF text + echo "

" . _("This text will appear on top of every user PDF file.") . "

\n"; + + echo (""); + +echo ("". + "\n"); +echo ("\n"); + + echo "
". + _("Text for user PDF") . ":
\n"; + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> + + + + + + + diff --git a/lam-0.4/templates/confwiz/o_lang.php b/lam-0.4/templates/confwiz/o_lang.php new file mode 100644 index 00000000..1a42d09c --- /dev/null +++ b/lam-0.4/templates/confwiz/o_lang.php @@ -0,0 +1,175 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// check if user clicked on cancel button +if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + exit; +} + +// check if user clicked on next button +if ($_POST['submit']) { + $errors = array(); + if (!$_SESSION['confwiz_config']->set_defaultLanguage($_POST['lang'])) { + $errors[] = _("Language is not defined!"); + } + if (!$_SESSION['confwiz_config']->set_Adminstring($_POST['admins'])) { + $errors[] = _("List of admin users is empty or invalid!"); + } + // if no errors save and go back to optional.php + if (sizeof($errors) < 1) { + $_SESSION['confwiz_config']->save(); + $_SESSION['confwiz_optional']['lang'] = 'done'; + metarefresh('optional.php'); + } + else { + // errors occured + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "



" . _("Back to language and admin settings.") . "

\n"; + echo "\n"; + exit; + } +} + + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

 

\n"; + + // language + echo "

" . _("Please select your prefered language.") . "
\n"; + echo _("This defines the language of the login window and sets this language as the default language. Users can change the language at login.") . + "

\n"; + + echo (""); + + echo (""); + echo ("\n"); + echo ("\n"); + + echo "
" . _("Default language") . ":\n"); + // read available languages + $languagefile = "../../config/language"; + if(is_file($languagefile)) + { + $file = fopen($languagefile, "r"); + $i = 0; + while(!feof($file)) + { + $line = fgets($file, 1024); + if($line == "\n" || $line[0] == "#" || $line == "") continue; // ignore comment and empty lines + $languages[$i] = chop($line); + $i++; + } + fclose($file); + // generate language list + echo ("\n"); + } + else + { + echo _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site."); + } + echo ("
\n"; + + echo "


\n"; + echo "


\n"; + +// admin users + echo "

" . _("If you want more than one user to login to LAM please enter its DN(s) here. Multiple entries are seperated by semicolons.") . "

\n"; + echo "

" . _("Example") . ": cn=admin,dc=yourdomain,dc=org;cn=manager,dc=yourdomain,dc=org

\n"; + + echo (""); + + echo ("". + "\n"); + echo ("\n"); + + echo "
". + _("List of valid users") . " *: get_Adminstring() . "\">
\n"; + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> + + + + + + diff --git a/lam-0.4/templates/confwiz/o_lists.php b/lam-0.4/templates/confwiz/o_lists.php new file mode 100644 index 00000000..900c3c4e --- /dev/null +++ b/lam-0.4/templates/confwiz/o_lists.php @@ -0,0 +1,160 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// check if user clicked on cancel button +if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + exit; +} + +// check if user clicked on next button +if ($_POST['submit']) { + $errors = array(); + if (!$_SESSION['confwiz_config']->set_userlistAttributes($_POST['usrlstattr'])) { + $errors[] = _("User list attributes are invalid!"); + } + if (!$_SESSION['confwiz_config']->set_grouplistAttributes($_POST['grplstattr'])) { + $errors[] = _("Group list attributes are invalid!"); + } + if (!$_SESSION['confwiz_config']->set_hostlistAttributes($_POST['hstlstattr'])) { + $errors[] = _("Host list attributes are invalid!"); + } + // if no errors save and go back to optional.php + if (sizeof($errors) < 1) { + $_SESSION['confwiz_config']->save(); + $_SESSION['confwiz_optional']['lists'] = 'done'; + metarefresh('optional.php'); + } + else { + // errors occured + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "



" . _("Back to list settings.") . "

\n"; + echo "\n"; + exit; + } +} + + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

 

\n"; + + echo "

" . _("Please enter which attributes should be displayed in the list views.") . "

\n"; + echo "

" . _("This can be a list of predefined attributes which have a description and are translated or you can write your own description.") . + " " . _("Predefined attributes are of type \"#attribute\".") . + " " . _("If you want to input your own description it would look like this: \"attribute:description\".") . + "
" . _("The entries are separated by semicolons.") . + "


" . + _("Example") . + ": #homeDirectory;#uid;#uidNumber;#gidNumber;mail:Mail address


" . + _("Predefined values") . ":

" . + _("Users") . + ": #uid, #uidNumber, #gidNumber, #cn, #host, #givenName, #sn, #homeDirectory, #loginShell, #mail, #gecos". + "
" . + _("Groups") . + ": #cn, #gidNumber, #memberUID, #member, #description". + "
" . + _("Hosts") . + ": #uid, #cn, #rid, #description" . "

\n"; + echo "

 

\n"; + + echo (""); + +// user list attributes +echo ("". + ""); +echo ("\n"); +// group list attributes +echo ("". + ""); +echo ("\n"); +// host list attributes +echo ("". + ""); +echo ("\n"); + + echo "
". + _("Attributes in User List") . " *:get_userlistAttributes() . "\">
". + _("Attributes in Group List") . " *:get_grouplistAttributes() . "\">
". + _("Attributes in Host List") . " *:get_hostlistAttributes() . "\">
\n"; + + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> + + + + + diff --git a/lam-0.4/templates/confwiz/o_ranges.php b/lam-0.4/templates/confwiz/o_ranges.php new file mode 100644 index 00000000..78f7ec80 --- /dev/null +++ b/lam-0.4/templates/confwiz/o_ranges.php @@ -0,0 +1,164 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// check if user clicked on cancel button +if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + exit; +} + +// check if user clicked on next button +if ($_POST['submit']) { + $errors = array(); + if (!$_SESSION['confwiz_config']->set_minUID($_POST['minUID'])) { + $errors[] = _("Minimum UID number is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_maxUID($_POST['maxUID'])) { + $errors[] = _("Maximum UID number is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_minGID($_POST['minGID'])) { + $errors[] = _("Minimum GID number is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_maxGID($_POST['maxGID'])) { + $errors[] = _("Maximum GID number is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_minMachine($_POST['minMach'])) { + $errors[] = _("Minimum Machine number is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_maxMachine($_POST['maxMach'])) { + $errors[] = _("Maximum Machine number is invalid!"); + } + // if no errors save and go back to optional.php + if (sizeof($errors) < 1) { + $_SESSION['confwiz_config']->save(); + $_SESSION['confwiz_optional']['ranges'] = 'done'; + metarefresh('optional.php'); + } + else { + // errors occured + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "



" . _("Back to range settings.") . "

\n"; + echo "\n"; + exit; + } +} + + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

 

\n"; + + echo "

" . _("Please enter the UID/GID ranges for your accounts:") . "

\n"; + echo "

 

\n"; + + echo (""); + + // minUID + echo ("\n"); + // maxUID + echo ("\n"); + // UID text + echo ("\n"); + // minGID + echo ("\n"); + // maxGID + echo ("\n"); + // GID text + echo ("\n"); + // minMach + echo ("\n"); + // maxMach + echo ("\n"); + // Machine text + echo ("\n"); + + echo "
". + _("Minimum UID number") . " *: ". + "get_minUID() . "\"> " . _("Maximum UID number") . " *: ". + "get_maxUID() . "\">" . _("Help") . "
". + _("Minimum GID number") . " *: ". + "get_minGID() . "\"> " . _("Maximum GID number")." *: ". + "get_maxGID() . "\">" . _("Help") . "
". + _("Minimum Machine number") . " *: ". + "get_minMachine() . "\"> " . _("Maximum Machine number") . " *: ". + "get_maxMachine() . "\">" . _("Help") . "
\n"; + + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> + + + + diff --git a/lam-0.4/templates/confwiz/optional.php b/lam-0.4/templates/confwiz/optional.php new file mode 100644 index 00000000..2cf69886 --- /dev/null +++ b/lam-0.4/templates/confwiz/optional.php @@ -0,0 +1,80 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + +// if no optional pages should be displayed go to ldaptest +if (sizeof($_SESSION['confwiz_optional']) < 1) { + metarefresh('ldaptest.php'); + exit; +} + +// UID/GID ranges +if ($_SESSION['confwiz_optional']['ranges'] == 'yes') { + metarefresh('o_ranges.php'); + exit; +} + +// list attributes +if ($_SESSION['confwiz_optional']['lists'] == 'yes') { + metarefresh('o_lists.php'); + exit; +} + +// language, admins +if ($_SESSION['confwiz_optional']['lang'] == 'yes') { + metarefresh('o_lang.php'); + exit; +} + +// lamdaemon and PDF text +if ($_SESSION['confwiz_optional']['daemon'] == 'yes') { + metarefresh('o_daemon.php'); + exit; +} + +// if all pages were displayed go to ldaptest +metarefresh('ldaptest.php'); + +?> + + + + diff --git a/lam-0.4/templates/confwiz/server.php b/lam-0.4/templates/confwiz/server.php new file mode 100644 index 00000000..8576048d --- /dev/null +++ b/lam-0.4/templates/confwiz/server.php @@ -0,0 +1,202 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + + +// check if user clicked on buttons +if ($_POST['submit'] || $_POST['cancel']) { + unset($error); + unset($ret); + if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + } + else { + // check server URL + if ($_SESSION['confwiz_config']->set_serverURL($_POST['serverurl'])) { + // set Samba version + if ($_POST['sambaversion'] == "2") $_SESSION['confwiz_config']->set_samba3("no"); + else $_SESSION['confwiz_config']->set_samba3("yes"); + $_SESSION['confwiz_config']->set_Adminstring($_POST['ldapadmin']); + // save settings + $_SESSION['confwiz_config']->save(); + // create LDAP object and test connection + $_SESSION['confwiz_ldap'] = new Ldap($_SESSION['confwiz_config']); + $ret = $_SESSION['confwiz_ldap']->connect($_POST['ldapadmin'], $_POST['ldappwd']); + if ($ret === 0) { + metarefresh('server2.php'); + } + elseif ($ret === False) $error = _("Cannot connect to specified LDAP-Server. Please try again."); + elseif ($ret == 81) $error = _("Cannot connect to specified LDAP-Server. Please try again."); + elseif ($ret == 49) $error = _("Wrong Password/Username combination. Try again."); + else $error = _("LDAP error, server says:") . "\n
($ret) " . ldap_err2str($ret); + } + else { + $error = _("Server Address is empty!"); + } + // print error message if needed + if ($error) { + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + StatusMessage("ERROR", $error, ""); + echo "



" . _("Back to last page") . "

\n"; + echo "\n"; + } + // if all ok, go to next page + else { + metarefresh('server2.php'); + } + } + exit; +} + +// check if back button was pressed +$back = false; +if ($_GET['back'] || $_POST['back']) { + $back = true; + $auth = $_SESSION['confwiz_ldap']->decrypt(); +} + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; +// formular +echo "
\n"; + echo "

\n"; + echo "\n"; + + // server URL + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + // admin user+password + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + // master password + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo _("Please enter the URL of your LDAP server.") . "

" . + _("Examples") . ":

ldap://myserver.mydomain.org
ldaps:myserver.mydomain.org
localhost:389" . "\n"; + echo "
 
\n"; + echo "" . _("Server address") . ":\n"; + echo "\n"; + if ($back) echo "get_ServerURL() . "\">\n"; + else echo "\n"; + echo "
 
\n"; + echo _("To connect to your LDAP server please enter now the DN of your administrative user and the password.") . "\n"; + echo "
 
\n"; + echo "" . _("LDAP admin DN") . ":\n"; + echo "\n"; + if ($back) echo "\n"; + else echo "\n"; + echo "
\n"; + echo "" . _("Password") . ":\n"; + echo "\n"; + if ($back) echo "\n"; + else echo "\n"; + echo "
 
 
\n"; + echo _("Which Samba version do you use?") . "\n"; + echo "
 
\n"; + echo "" . _("Samba version") . ":\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> diff --git a/lam-0.4/templates/confwiz/server2.php b/lam-0.4/templates/confwiz/server2.php new file mode 100644 index 00000000..eb13572c --- /dev/null +++ b/lam-0.4/templates/confwiz/server2.php @@ -0,0 +1,243 @@ +password != $_SESSION['confwiz_masterpwd']) { + require("../config/conflogin.php"); + exit; +} + + +// check if user clicked on buttons +if ($_POST['submit'] || $_POST['cancel'] || $_POST['back']) { + unset($error); + unset($ret); + if ($_POST['cancel']) { + @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); + metarefresh('../config/conflogin.php'); + } + elseif ($_POST['back']) { + metarefresh('server.php?back=true'); + } + else { + // set input values + $errors = array(); + if (!$_SESSION['confwiz_config']->set_UserSuffix($_POST['usersuffix'])) { + $error = _("UserSuffix is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_GroupSuffix($_POST['groupsuffix'])) { + $error = _("GroupSuffix is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_HostSuffix($_POST['hostsuffix'])) { + $error = _("HostSuffix is invalid!"); + } + if ($_SESSION['confwiz_config']->is_samba3() && !$_SESSION['confwiz_config']->set_DomainSuffix($_POST['domainsuffix'])) { + $error = _("DomainSuffix is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_pwdhash($_POST['pwdhash'])) { + $error = _("Password hash is invalid!"); + } + if (!$_SESSION['confwiz_config']->set_cacheTimeout($_POST['cachetimeout'])) { + $error = _("Cache timeout is invalid!"); + } + $_SESSION['confwiz_config']->save(); + // print error message if needed + if (sizeof($errors) > 0) { + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + for ($i = 0; $i < sizeof($errors); $i++) { + StatusMessage("ERROR", $errors[$i], ""); + } + echo "



" . _("Back to last page") . "

\n"; + echo "\n"; + } + // if all ok, go to next page + else { + $_SESSION['confwiz_optional'] = array(); + if ($_POST['ranges']) $_SESSION['confwiz_optional']['ranges'] = 'yes'; + if ($_POST['lists']) $_SESSION['confwiz_optional']['lists'] = 'yes'; + if ($_POST['lang']) $_SESSION['confwiz_optional']['lang'] = 'yes'; + if ($_POST['daemon']) $_SESSION['confwiz_optional']['daemon'] = 'yes'; + metarefresh('optional.php'); + } + } + exit; +} + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

\n"; + echo "\n"; + + // suffixes + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($_SESSION['confwiz_config']->is_samba3()) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + + // password hash + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + // cache timeout + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo _("Please enter the suffixes of your LDAP tree where LAM should store the accounts."); + echo "
 
\n"; + echo "" . _("UserSuffix") . ":\n"; + echo "\n"; + echo "get_userSuffix() . "\">\n"; + echo "
\n"; + echo "" . _("GroupSuffix") . ":\n"; + echo "\n"; + echo "get_groupSuffix() . "\">\n"; + echo "
\n"; + echo "" . _("HostSuffix") . ":\n"; + echo "\n"; + echo "get_hostSuffix() . "\">\n"; + echo "
\n"; + echo "" . _("DomainSuffix") . ":\n"; + echo "\n"; + echo "get_domainSuffix() . "\">\n"; + echo "
 
 
\n"; + echo _("LAM supports CRYPT, SHA, SSHA, MD5 and SMD5 to generate the hash value of an user password. SSHA and CRYPT are the most common but CRYPT does not support passwords greater than 8 letters. We do not recommend to use plain text passwords.") . "\n"; + echo "
 
\n"; + echo "" . _("Password hash type") . ":\n"; + echo "\n"; + echo "\n"); + echo "
 
 
\n"; + echo _("LAM caches its LDAP searches, you can set the cache time here. Shorter times will stress LDAP more but decrease the possibility that changes are not identified.") . "\n"; + echo "
 
\n"; + echo "" . _("Cache timeout") . ":\n"; + echo "\n"; + echo "\n"); + echo "
\n"; + + echo "


\n"; + +// optional pages + echo "
" . _("Optional settings") . "\n"; + echo "

" . _("Please select here if you want to make additional changes to your configuration profile or if LAM should use default values.") . + "

\n"; + echo "" . _("Ranges for UID and GID numbers") . "
\n"; + echo "" . _("Attributes in list views") . "
\n"; + echo "" . _("Language and additional admin users") . "
\n"; + echo "" . _("Lamdaemon settings and PDF text") . "
\n"; + echo "
\n"; + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?> diff --git a/lam-0.4/templates/confwiz/start.php b/lam-0.4/templates/confwiz/start.php new file mode 100644 index 00000000..802cd205 --- /dev/null +++ b/lam-0.4/templates/confwiz/start.php @@ -0,0 +1,189 @@ +password != $_POST['masterpwd']) { + $error = _("Master password is wrong!"); + } + // check if passwords are equal and not empty + elseif ($_POST['passwd1'] && ($_POST['passwd1'] != "") && ($_POST['passwd1'] == $_POST['passwd2'])) { + // check if profile name is valid + if (eregi("^[a-z0-9\-_]+$", $_POST['profname']) && !in_array($_POST['profname'], getConfigProfiles())) { + // create new profile file + @copy("../../config/lam.conf_sample", "../../config/" . $_POST['profname'] . ".conf"); + @chmod ("../../config/" . $_POST['profname'] . ".conf", 0600); + $file = is_file("../../config/" . $_POST['profname'] . ".conf"); + if ($file) { + // load as config and write new password + $conf = new Config($_POST['profname']); + $conf->Passwd = $_POST['passwd1']; + $conf->save(); + $_SESSION['confwiz_config'] = $conf; + $_SESSION['confwiz_masterpwd'] = $_POST['masterpwd']; + } + else $error = _("Unable to create new profile!"); + } + else $error = _("Profile name is invalid!"); + } + else $error = _("Profile passwords are different or empty!"); + // print error message if needed + if ($error) { + echo $_SESSION['header']; + echo "\n"; + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; + StatusMessage("ERROR", $error, ""); + echo "



" . _("Back to profile login") . "

\n"; + echo "\n"; + } + // if all ok, go to next page + else { + metarefresh('server.php'); + } + } + exit; +} + +// remove variables of older wizard calls +unset($_SESSION['conwiz_masterpwd']); +unset($_SESSION['confwiz_config']); + +echo $_SESSION['header']; + + echo "\n"; + echo _("Configuration wizard"); + echo "\n"; + echo "\n"; +echo "\n"; +echo "\n"; + echo "

\n"; + echo "\"LDAP\n"; + echo "

\n"; + echo "
\n"; + +// formular +echo "
\n"; + echo "

" . _("Welcome to LAM Configuration wizard.") . "

\n"; + echo "

\n"; + echo "This druid will help you to create a configuration file for LAM and set up LDAP.\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + + // profile name + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + // password + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + // master password + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo _("Please enter a name for the new profile. The name may contain letters, digits and -_.") . "\n"; + echo "
 
\n"; + echo "" . _("Profile name") . ":\n"; + echo "\n"; + echo "\n"; + echo "
 
\n"; + echo _("Configuration profiles are protected with a password from unauthorised access. Please enter it here.") . "\n"; + echo "
 
\n"; + echo "" . _("Password") . ":\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "" . _("Reenter Password") . ":\n"; + echo "\n"; + echo "\n"; + echo "
 
 
\n"; + echo _("Please enter your configuration master password. This password is \"lam\" by default.") . "\n"; + echo "
 
\n"; + echo "" . _("Master password") . ":\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + + echo "


\n"; + +// next/cancel button + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + +echo "
\n"; + +echo "\n\n"; + +?>