_("Your account")));
dual_begin(array());
print("
\n");
print("" . _("You have not authenticated yourself to the system yet with your") . " " . _("username") . " " . _("and") . " " . _("password") . ". " .
_("You will not be able to use this section of the website without authenticating yourself first. So, please continue and login using the form on the right hand side.") . "
\n");
dual_middle(array());
show_account_details(array());
dual_end(array());
generic_footer(array());
exit;
}
generic_header(array("title" => _("Administration Section")));
single_begin(array());
print("" . _("Home") . " / " . _("Administration Section") . "
\n");
if (count($HTTP_POST_VARS) > 0)
{
$authconfigcommand = "/usr/bin/sudo /usr/sbin/authconfig --kickstart --disablecache";
if (strlen($HTTP_POST_VARS["usenis"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usenis"], "on") == 0)
$authconfigcommand .= " --enablenis --nisdomain=\"" . $HTTP_POST_VARS["nisdomain"] . "\" --nisserver=\"" . $HTTP_POST_VARS["nisserver"] . "\"";
}
else
$authconfigcommand .= " --disablenis";
if (strlen($HTTP_POST_VARS["useldap"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["useldap"], "on") == 0)
$authconfigcommand .= " --enableldap --ldapserver=\"" . $HTTP_POST_VARS["ldapserver"] . "\" --ldapbasedn=\"" . $HTTP_POST_VARS["ldapbasedn"] . "\" --ldapbinddn=\"" . $HTTP_POST_VARS["ldapbinddn"] . "\" --ldapbindpw=\"" . $HTTP_POST_VARS["ldapbindpw"] . "\" --ldaprootbinddn=\"" . $HTTP_POST_VARS["ldaprootbinddn"] . "\" --ldaprootbindpw=\"" . $HTTP_POST_VARS["ldaprootbindpw"] . "\"";
}
else
$authconfigcommand .= " --disableldap";
if (strlen($HTTP_POST_VARS["ldaptls"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["ldaptls"], "on") == 0)
$authconfigcommand .= " --enableldaptls";
}
else
$authconfigcommand .= " --disableldaptls";
if (strlen($HTTP_POST_VARS["useldapauth"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["useldapauth"], "on") == 0)
$authconfigcommand .= " --enableldapauth";
}
else
$authconfigcommand .= " --disableldapauth";
if (strlen($HTTP_POST_VARS["usehesiod"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usehesiod"], "on") == 0)
$authconfigcommand .= " --enablehesiod --hesiodlhs=\"" . $HTTP_POST_VARS["hesiodlhs"] . "\" --hesiodrhs=\"" . $HTTP_POST_VARS["hesiodrhs"] . "\"";
}
else
$authconfigcommand .= " --disablehesiod";
if (strlen($HTTP_POST_VARS["usewinbind"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usewinbind"], "on") == 0)
$authconfigcommand .= " --enablewinbind --winbindseparator=_ --winbindtemplateshell=/sbin/nologin --smbsecurity=" . $HTTP_POST_VARS["winbindtype"] . " --smbservers=\"" . $HTTP_POST_VARS["winbindcontrollers"] . "\" --smbrealm=\"" . $HTTP_POST_VARS["winbindrealm"] . "\" --smbworkgroup=\"" . $HTTP_POST_VARS["winbinddomain"] . "\" --smbidmapuid=\"" . $HTTP_POST_VARS["winbinduidrange"] . "\" --smbidmapgid=\"" . $HTTP_POST_VARS["winbindgidrange"] . "\"";
}
else
$authconfigcommand .= " --disablewinbind";
if (strlen($HTTP_POST_VARS["useshadow"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["useshadow"], "on") == 0)
$authconfigcommand .= " --enableshadow";
}
else
$authconfigcommand .= " --disableshadow";
if (strlen($HTTP_POST_VARS["usemd5"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usemd5"], "on") == 0)
$authconfigcommand .= " --enablemd5";
}
else
$authconfigcommand .= " --disablemd5";
if (strlen($HTTP_POST_VARS["usekerberos"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usekerberos"], "on") == 0)
$authconfigcommand .= " --enablekrb5 --krb5realm=\"" . $HTTP_POST_VARS["krbrealm"] . "\" --krb5kdc=\"" . $HTTP_POST_VARS["krbkdc"] . "\" --krb5adminserver=\"" . $HTTP_POST_VARS["krbadminserver"] . "\"";
}
else
$authconfigcommand .= " --disablekrb5";
if (strlen($HTTP_POST_VARS["usesmb"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["usesmb"], "on") == 0)
$authconfigcommand .= " --enablesmbauth --smbworkgroup=\"" . $HTTP_POST_VARS["smbworkgroup"] . "\" --smbservers=\"" . $HTTP_POST_VARS["smbservers"] . "\"";
}
else
$authconfigcommand .= " --disablesmbauth";
exec($authconfigcommand);
// print($authconfigcommand);
// exit;
if (strlen($HTTP_POST_VARS["usewinbind"]) > 0)
{
if ((strcasecmp($HTTP_POST_VARS["usewinbind"], "on") == 0) && (strcasecmp($HTTP_POST_VARS["winbindjoin"], "on") == 0))
{
if (strncasecmp($HTTP_POST_VARS["winbindtype"], "ads", 3) == 0)
exec("/usr/bin/sudo /usr/bin/net ads join -w " . escapeshellarg($HTTP_POST_VARS["winbinddomain"]) . " -U " . escapeshellarg($HTTP_POST_VARS["winbindadminusername"]) . "%" . escapeshellarg($HTTP_POST_VARS["winbindadminpassword"]));
else
exec("/usr/bin/sudo /usr/bin/net rpc join " . escapeshellarg($HTTP_POST_VARS["winbinddomain"]) . " -U " . escapeshellarg($HTTP_POST_VARS["winbindadminusername"]) . "%" . escapeshellarg($HTTP_POST_VARS["winbindadminpassword"]));
}
}
apply_configuration();
if (strlen($HTTP_POST_VARS["ldap_smb_login"]) > 0)
{
if (strcasecmp($HTTP_POST_VARS["ldap_smb_login"], "on") == 0)
{
exec("/usr/bin/sudo /usr/bin/smbpasswd -w " . escapeshellarg($HTTP_POST_VARS["ldaprootbindpw"]));
}
}
$fp = popen("/usr/bin/sudo /usr/bin/at now + 1 minutes", "w");
fputs($fp, "/sbin/service openfiler restart\n");
pclose($fp);
header("Location: ./");
exit;
}
?>
Welcome Administrator. The following are various system information and preferences, arranged
into tabs. Please click on a tab to open up that category.