diff --git a/lam/TODO b/lam/TODO index 465a6f49..05fba82a 100644 --- a/lam/TODO +++ b/lam/TODO @@ -14,4 +14,3 @@ alpha 3 - improve mass creation of users/groups/hosts - translate to German - PDF support -- ID-Mapping diff --git a/lam/config/lam.conf_sample b/lam/config/lam.conf_sample index c81ad4fc..69156de0 100644 --- a/lam/config/lam.conf_sample +++ b/lam/config/lam.conf_sample @@ -27,10 +27,6 @@ hostsuffix: ou=machines,dc=my-domain,dc=com # e.g. ou=domains,dc=yourdomain,dc=org domainsuffix: ou=domains,dc=my-domain,dc=com -# suffix of Samba 3 user/group mappings -# e.g. ou=mappings,dc=yourdomain,dc=org -mapsuffix: - # minimum and maximum UID numbers minUID: 10000 maxUID: 20000 diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 76184431..49193d0b 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -88,7 +88,7 @@ class Config { var $Suff_domains; // suffix for user/group mappings (Samba 3) - var $Suff_map; + //var $Suff_map; // minimum/maximum numbers for UID, GID and UID of Samba Hosts var $MinUID; @@ -172,10 +172,10 @@ class Config { $this->Suff_domains = chop(substr($line, 14, strlen($line)-14)); continue; } - if (substr($line, 0, 11) == "mapsuffix: ") { +/* if (substr($line, 0, 11) == "mapsuffix: ") { $this->Suff_map = chop(substr($line, 11, strlen($line)-11)); continue; - } + }*/ if (substr($line, 0, 8) == "minUID: ") { $this->MinUID = chop(substr($line, 8, strlen($line)-8)); continue; @@ -300,11 +300,11 @@ class Config { $save_suffdom = True; continue; } - if (substr($file_array[$i], 0, 11) == "mapsuffix: ") { +/* if (substr($file_array[$i], 0, 11) == "mapsuffix: ") { $file_array[$i] = "mapsuffix: " . $this->Suff_map . "\n"; $save_suffmap = True; continue; - } + }*/ if (substr($file_array[$i], 0, 8) == "minUID: ") { $file_array[$i] = "minUID: " . $this->MinUID . "\n"; $save_minUID = True; @@ -395,8 +395,8 @@ class Config { "# e.g. ou=machines,dc=yourdomain,dc=org\n" . "hostsuffix: " . $this->Suff_hosts . "\n"); if (!$save_suffdom == True) array_push($file_array, "\n\n# suffix of Samba 3 domains\n" . "# e.g. ou=domains,dc=yourdomain,dc=org\n" . "domainsuffix: " . $this->Suff_domains . "\n"); - if (!$save_suffmap == True) array_push($file_array, "\n\n# suffix of Samba 3 user/group mappings\n" . - "# e.g. ou=mappings,dc=yourdomain,dc=org\n" . "mapsuffix: " . $this->Suff_map . "\n"); +// if (!$save_suffmap == True) array_push($file_array, "\n\n# suffix of Samba 3 user/group mappings\n" . +// "# e.g. ou=mappings,dc=yourdomain,dc=org\n" . "mapsuffix: " . $this->Suff_map . "\n"); if (!$save_minUID == True) array_push($file_array, "\n\n# minimum UID number\n" . "minUID: " . $this->MinUID . "\n"); if (!$save_maxUID == True) array_push($file_array, "\n\n# maximum UID number\n" . "maxUID: " . $this->MaxUID . "\n"); if (!$save_minGID == True) array_push($file_array, "\n\n# minimum GID number\n" . "minGID: " . $this->MinGID . "\n"); @@ -436,7 +436,7 @@ class Config { echo "" . _("GroupSuffix") . ": " . $this->Suff_groups . "
"; echo "" . _("HostSuffix") . ": " . $this->Suff_hosts . "
"; echo "" . _("DomainSuffix") . ": " . $this->Suff_domains . "
"; - echo "" . _("MappingSuffix") . ": " . $this->Suff_map . "
"; +// echo "" . _("MappingSuffix") . ": " . $this->Suff_map . "
"; echo "" . _("Minimum UID number") . ": " . $this->MinUID . "
"; echo "" . _("Maximum UID number") . ": " . $this->MaxUID . "
"; echo "" . _("Minimum GID number") . ": " . $this->MinGID . "
"; @@ -574,19 +574,19 @@ class Config { } // returns the LDAP suffix where mappings are saved - function get_MapSuffix() { +/* function get_MapSuffix() { return $this->Suff_map; - } + }*/ // sets the LDAP suffix where mappings are saved - function set_MapSuffix($value) { +/* function set_MapSuffix($value) { if (!$value) $this->Suff_map = ""; // optional parameter elseif (is_string($value) && (eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $value))) { $this->Suff_map = $value; } else return false; return true; - } + }*/ // returns the minimum UID to use when creating new users function get_minUID() { diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index cec4b4ca..857184bf 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -47,7 +47,7 @@ if ($_POST['back'] || $_POST['submitconf']){ if ($_POST['suffgroups']) $suffgroups = $_POST['suffgroups']; if ($_POST['suffhosts']) $suffhosts = $_POST['suffhosts']; if ($_POST['suffdomains']) $suffdomains = $_POST['suffdomains']; - if ($_POST['suffmap']) $suffmap = $_POST['suffmap']; +// if ($_POST['suffmap']) $suffmap = $_POST['suffmap']; if ($_POST['minUID']) $minUID = $_POST['minUID']; if ($_POST['maxUID']) $maxUID = $_POST['maxUID']; if ($_POST['minGID']) $minGID = $_POST['minGID']; @@ -68,7 +68,7 @@ if ($_POST['back'] || $_POST['submitconf']){ else $scriptserver = ""; if ($_POST['filename']) $filename = $_POST['filename']; session_register('passwd', 'passwd1', 'passwd2', 'serverurl', 'admins', 'suffusers', - 'suffgroups', 'suffhosts', 'suffdomains', 'suffmap', 'minUID', 'maxUID', 'minGID', + 'suffgroups', 'suffhosts', 'suffdomains', 'minUID', 'maxUID', 'minGID', 'maxGID', 'minMach', 'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries', 'lang', 'scriptpath', 'scriptserver', 'samba3', 'domainSID', 'filename'); echo(""); @@ -148,10 +148,10 @@ echo ("". "get_DomainSuffix() . "\">\n"); echo ("" . _("Help") . "\n"); // mapping suffix -echo ("". +/*echo ("". _("MappingSuffix") . ": ". "get_MapSuffix() . "\">\n"); -echo ("" . _("Help") . "\n"); +echo ("" . _("Help") . "\n");*/ echo (""); echo (""); diff --git a/lam/templates/config/confsave.php b/lam/templates/config/confsave.php index 224fa934..9462b1d0 100644 --- a/lam/templates/config/confsave.php +++ b/lam/templates/config/confsave.php @@ -43,7 +43,7 @@ if ($_SESSION['suffusers']) $suffusers = $_SESSION['suffusers']; if ($_SESSION['suffgroups']) $suffgroups = $_SESSION['suffgroups']; if ($_SESSION['suffhosts']) $suffhosts = $_SESSION['suffhosts']; if ($_SESSION['suffdomains']) $suffdomains = $_SESSION['suffdomains']; -if ($_SESSION['suffmap']) $suffmap = $_SESSION['suffmap']; +//if ($_SESSION['suffmap']) $suffmap = $_SESSION['suffmap']; if ($_SESSION['minUID']) $minUID = $_SESSION['minUID']; if ($_SESSION['maxUID']) $maxUID = $_SESSION['maxUID']; if ($_SESSION['minGID']) $minGID = $_SESSION['minGID']; @@ -108,11 +108,11 @@ if (($samba3 == "yes") && !eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|- echo ("\n


" . _("Back to preferences...") . ""); exit; } -if ($suffmap && !eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $suffmap)) { +/*if ($suffmap && !eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $suffmap)) { echo ("" . _("MappingSuffix is invalid!") . ""); echo ("\n


" . _("Back to preferences...") . ""); exit; -} +}*/ if (!$minUID || !is_numeric($minUID)) { echo ("" . _("MinUID is invalid!") . ""); echo ("\n


" . _("Back to preferences...") . ""); @@ -201,7 +201,7 @@ $conf->set_UserSuffix($suffusers); $conf->set_GroupSuffix($suffgroups); $conf->set_HostSuffix($suffhosts); $conf->set_DomainSuffix($suffdomains); -$conf->set_MapSuffix($suffmap); +//$conf->set_MapSuffix($suffmap); $conf->set_minUID($minUID); $conf->set_maxUID($maxUID); $conf->set_minGID($minGID); @@ -248,7 +248,7 @@ session_unregister('suffusers'); session_unregister('suffgroups'); session_unregister('suffhosts'); session_unregister('suffdomains'); -session_unregister('suffmap'); +//session_unregister('suffmap'); session_unregister('minUID'); session_unregister('maxUID'); session_unregister('minGID'); diff --git a/lam/templates/main_header.php b/lam/templates/main_header.php index 56e8a29a..876b5d89 100644 --- a/lam/templates/main_header.php +++ b/lam/templates/main_header.php @@ -47,7 +47,7 @@ echo $_SESSION['header']; get_samba3() == "yes") echo "\n"; + if ($_SESSION['config']->get_samba3() == "yes") echo "\n"; else echo "\n"; ?> LDAP Account Manager @@ -64,7 +64,7 @@ echo $_SESSION['header']; get_samba3() == "yes") echo " \n"; + if ($_SESSION['config']->get_samba3() == "yes") echo " \n"; else echo " \n"; ?> @@ -73,7 +73,6 @@ echo $_SESSION['header']; get_samba3() == "yes") { - echo '' . _("User/Group Mapping") . '' . "\n"; echo '' . _("Domains") . '' . "\n"; echo '' . _("Users") . '' . "\n"; echo '' . _("Groups") . '' . "\n";