removed ID-mapping

This commit is contained in:
Roland Gruber 2003-08-03 11:46:35 +00:00
parent 63bf69b609
commit c686c97bfb
6 changed files with 23 additions and 29 deletions

View File

@ -14,4 +14,3 @@ alpha 3
- improve mass creation of users/groups/hosts
- translate to German
- PDF support
- ID-Mapping

View File

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

View File

@ -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 "<b>" . _("GroupSuffix") . ": </b>" . $this->Suff_groups . "<br>";
echo "<b>" . _("HostSuffix") . ": </b>" . $this->Suff_hosts . "<br>";
echo "<b>" . _("DomainSuffix") . ": </b>" . $this->Suff_domains . "<br>";
echo "<b>" . _("MappingSuffix") . ": </b>" . $this->Suff_map . "<br>";
// echo "<b>" . _("MappingSuffix") . ": </b>" . $this->Suff_map . "<br>";
echo "<b>" . _("Minimum UID number") . ": </b>" . $this->MinUID . "<br>";
echo "<b>" . _("Maximum UID number") . ": </b>" . $this->MaxUID . "<br>";
echo "<b>" . _("Minimum GID number") . ": </b>" . $this->MinGID . "<br>";
@ -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() {

View File

@ -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("<meta http-equiv=\"refresh\" content=\"0; URL=confsave.php\">");
@ -148,10 +148,10 @@ echo ("<tr><td align=\"right\"><b>".
"<td><input size=50 type=\"text\" name=\"suffdomains\" value=\"" . $conf->get_DomainSuffix() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=215\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
// mapping suffix
echo ("<tr><td align=\"right\"><b>".
/*echo ("<tr><td align=\"right\"><b>".
_("MappingSuffix") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"suffmap\" value=\"" . $conf->get_MapSuffix() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=216\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo ("<td><a href=\"../help.php?HelpNumber=216\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");*/
echo ("</table>");
echo ("</fieldset>");

View File

@ -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<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
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 ("<font color=\"red\"><b>" . _("MappingSuffix is invalid!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}
}*/
if (!$minUID || !is_numeric($minUID)) {
echo ("<font color=\"red\"><b>" . _("MinUID is invalid!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
@ -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');

View File

@ -47,7 +47,7 @@ echo $_SESSION['header'];
<td width="100" align="left"><a href="./profedit/profilemain.php" target="mainpart"><?php echo _("Profile Editor"); ?></a></td>
<?
// Samba 3 has more list views
if ($_SESSION['config']->get_samba3() == "yes") echo "<td rowspan=3 colspan=5 align=\"center\">\n";
if ($_SESSION['config']->get_samba3() == "yes") echo "<td rowspan=3 colspan=4 align=\"center\">\n";
else echo "<td rowspan=3 colspan=3 align=\"center\">\n";
?>
<a href="http://lam.sf.net" target="new_window"><img src="../graphics/banner.jpg" border=1 alt="LDAP Account Manager"></a>
@ -64,7 +64,7 @@ echo $_SESSION['header'];
<tr>
<?
// Samba 3 has more list views
if ($_SESSION['config']->get_samba3() == "yes") echo "<td colspan=7>&nbsp;</td>\n";
if ($_SESSION['config']->get_samba3() == "yes") echo "<td colspan=6>&nbsp;</td>\n";
else echo "<td colspan=5>&nbsp;</td>\n";
?>
</tr>
@ -73,7 +73,6 @@ echo $_SESSION['header'];
<?
// Samba 3 has more list views
if ($_SESSION['config']->get_samba3() == "yes") {
echo '<td width="120" align="center"><a href="./lists/listmappings.php" target="mainpart">' . _("User/Group Mapping") . '</a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listdomains.php" target="mainpart">' . _("Domains") . '</a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart">' . _("Users") . '</a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart">' . _("Groups") . '</a></td>' . "\n";