_("Your account"))); dual_begin(array()); print("

" . _("Home") . " / " . _("Your account") . "

\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; } if (($HTTP_GET_VARS["sort"] == "gid") || ($HTTP_POST_VARS["sort"] == "gid")) $sortorder = "gid"; else if (($HTTP_GET_VARS["sort"] == "gname") || ($HTTP_POST_VARS["sort"] == "gname")) $sortorder = "gname"; else if (($HTTP_GET_VARS["sort"] == "gtype") || ($HTTP_POST_VARS["sort"] == "gtype")) $sortorder = "gtype"; else $sortorder = "none"; $groups_gid = array(); $groups_name = array(); $groups_members = array(); $groups_type = array(); endgrent(); while ($group_info = getgrent()) { if (($group_info["gr_gid"] >= 500)) { array_push($groups_gid, $group_info["gr_gid"]); array_push($groups_name, $group_info["gr_name"]); array_push($groups_members, $group_info["gr_mem"]); array_push($groups_type, "Unknown"); } } endgrent(); $authp = popen("/usr/bin/sudo /usr/sbin/authconfig --openfiler --kickstart", "r"); $i = 0; while (!feof($authp)) $aresult[$i++] = trim(fgets($authp, 4096)); pclose($authp); if (strncasecmp($aresult[9], "YES", 3) == 0) { // add NIS groups $groupp = popen("/usr/bin/sudo /usr/bin/ypcat group", "r"); $i = 0; while (!feof($groupp)) { $gresult[$i] = explode(":", fgets($groupp, 4096)); foreach (($gresult[$i]) as $gresultitem) $gresultitem = trim($gresultitem); if ((strlen($gresult[$i][0]) > 0) && ($gresult[$i][2] >= 500)) { for ($j = 0; $j < count($groups_gid); $j++) if (($groups_gid[$j] == $gresult[$i][2]) && ($groups_name[$j] == $gresult[$i][0]) && ($groups_type[$j] == "Unknown")) $groups_type[$j] = "NIS"; } $i++; } pclose($groupp); } if (strncasecmp($aresult[5], "YES", 3) == 0) { // add LDAP groups } if (strncasecmp($aresult[2], "YES", 3) == 0) { // add Hesiod groups } // add local groups $groupp = popen("/usr/bin/sudo /bin/cat /etc/group", "r"); $i = 0; while (!feof($groupp)) { $gresult[$i] = explode(":", fgets($groupp, 4096)); foreach (($gresult[$i]) as $gresultitem) $gresultitem = trim($gresultitem); if ((strlen($gresult[$i][0]) > 0) && ($gresult[$i][2] >= 500)) { for ($j = 0; $j < count($groups_gid); $j++) if (($groups_gid[$j] == $gresult[$i][2]) && ($groups_name[$j] == $gresult[$i][0]) && ($groups_type[$j] == "Unknown")) $groups_type[$j] = "Local"; } $i++; } pclose($groupp); $users_uid = array(); $users_name = array(); $users_gid = array(); $users_gname = array(); $users_type = array(); endpwent(); while ($user_info = getpwent()) { if (($user_info["pw_uid"] >= 500)) { array_push($users_uid, $user_info["pw_uid"]); array_push($users_name, $user_info["pw_name"]); $ugid = $user_info["pw_gid"]; array_push($users_gid, $ugid); $found = 0; for ($i = 0; $i < count($groups_gid); $i++) if ($groups_gid[$i] == $ugid) { array_push($users_gname, $groups_name[$i]); $found = 1; break; } if ($found == 0) array_push($users_gname, "N/A"); array_push($users_type, "Unknown"); } } endpwent(); if (strncasecmp($aresult[9], "YES", 3) == 0) { // add NIS users $userp = popen("/usr/bin/sudo /usr/bin/ypcat passwd", "r"); $i = 0; while (!feof($userp)) { $uresult[$i] = explode(":", fgets($userp, 4096)); foreach (($uresult[$i]) as $uresultitem) $uresultitem = trim($uresultitem); if ((strlen($uresult[$i][0]) > 0) && ($uresult[$i][2] >= 500)) { for ($j = 0; $j < count($users_uid); $j++) if (($users_uid[$j] == $uresult[$i][2]) && ($users_name[$j] == $uresult[$i][0]) && ($users_type[$j] == "Unknown")) $users_type[$j] = "NIS"; } $i++; } pclose($userp); } if (strncasecmp($aresult[5], "YES", 3) == 0) { // add LDAP users } if (strncasecmp($aresult[2], "YES", 3) == 0) { // add Hesiod users } // add local users $userp = popen("/usr/bin/sudo /bin/cat /etc/passwd", "r"); $i = 0; while (!feof($userp)) { $uresult[$i] = explode(":", fgets($userp, 4096)); foreach (($uresult[$i]) as $uresultitem) $uresultitem = trim($uresultitem); if ((strlen($uresult[$i][0]) > 0) && ($uresult[$i][2] >= 500)) { for ($j = 0; $j < count($users_uid); $j++) if (($users_uid[$j] == $uresult[$i][2]) && ($users_name[$j] == $uresult[$i][0]) && ($users_type[$j] == "Unknown")) $users_type[$j] = "Local"; } $i++; } pclose($userp); generic_header(array("title" => _("Administration Section"))); single_begin(array()); print("

" . _("Home") . " / " . _("Administration Section") . "

\n"); ?>

Welcome Administrator. The following are various system information and preferences, arranged into tabs. Please click on a tab to open up that category.

List of groups

The following is a list of groups available to the system.

\n"); print("\t\n"); print("\t\n"); print("\t\n"); print("\n"); } ?>
">GID ">Group Name " align="center">Group Type
" . $groups_gid[$i] . "" . htmlentities($groups_name[$i]) . "" . $groups_type[$i] . "