#!/usr/bin/perl require './user-lib.pl'; # Show header with password DB type $pft = &passfiles_type(); $pftmsg = &text('index_pft', $text{'index_pft'.$pft} || $pft); &ui_print_header($pftmsg, $text{'index_title'}, "", "intro", 1, 1, 0, &help_search_link("passwd group shadow gshadow", "man")); $formno = 0; &ReadParse(); @quarters = ( "width=25%", "width=25%", "width=25%", "width=25%" ); # Get the user and group lists @allulist = &list_users(); @ulist = &list_allowed_users(\%access, \@allulist); @allglist = &list_groups(); @glist = &list_allowed_groups(\%access, \@allglist); foreach $g (@allglist) { $usedgid{$g->{'gid'}} = $g; } # Start of tabs, based on what can be edited @tabs = ( ); if (@ulist || $access{'ucreate'}) { push(@tabs, [ "users", $text{'index_users'}, "index.cgi?mode=users" ]); $can_users = 1; } if (@glist || $access{'gcreate'}) { push(@tabs, [ "groups", $text{'index_groups'}, "index.cgi?mode=groups" ]); $can_groups = 1; } print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || $tabs[0]->[0], 1); # Start of users tab if ($can_users) { print &ui_tabs_start_tab("mode", "users"); } if (@ulist > $config{'display_max'}) { # Display advanced search form print "<b>$text{'index_toomany'}</b><p>\n"; print &ui_form_start("search_user.cgi"); print &ui_table_start($text{'index_usheader'}, undef, 2); # Field to search print &ui_table_row($text{'index_find'}, &ui_select("field", "userreal", [ [ "userreal", $text{'index_userreal'} ], [ "user", $text{'user'} ], [ "real", $text{'real'} ], [ "shell", $text{'shell'} ], [ "home", $text{'home'} ], [ "uid", $text{'uid'} ], [ "group", $text{'group'} ], [ "gid", $text{'gid'} ] ])." ". &ui_select("match", 4, $match_modes)); # Text print &ui_table_row($text{'index_ftext'}, &ui_textbox("what", undef, 50)); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'find'} ] ]); $formno++; } elsif (@ulist) { # Display a table of all users @ulist = &sort_users(\@ulist, $config{'sort_mode'}); if ($config{'display_mode'} == 2) { # Show usernames under groups foreach $u (@ulist) { push(@{$ug{$u->{'gid'}}}, $u); } @table = ( ); foreach $g (sort { $usedgid{$a}->{'group'} cmp $usedgid{$b}->{'group'} } keys %ug) { @grid = map { &user_link($_) } @{$ug{$g}}; push(@table, [ &html_escape($usedgid{$g}->{'group'}), &ui_grid_table(\@grid, 4, 100, \@quarters) ]); } print &ui_columns_table( [ $text{'index_ugroup'}, $text{'index_users'} ], 100, \@table, ); } elsif ($config{'display_mode'} == 1) { # Show names, real names, home dirs and shells @b = &get_user_buttons(); @left = grep { !/batch_form|export_form/ } @b; @right = grep { /batch_form|export_form/ } @b; &users_table(\@ulist, $formno++, 0, 0, \@left, \@right); $no_user_buttons = 1; } else { # Just show names @grid = map { &user_link($_) } @ulist; print &ui_grid_table(\@grid, 4, 100, \@quarters, undef, $text{'index_users'}); } } elsif ($access{'ucreate'}) { if (@allulist) { print "<b>$text{'index_notusers'}</b>. <p>\n"; } else { print "<b>$text{'index_notusers2'}</b>. <p>\n"; } } &show_user_buttons() if (!$no_user_buttons); # End of users tab if ($can_users) { print &ui_tabs_end_tab("mode", "users"); } # Start of groups tab if ($can_groups) { print &ui_tabs_start_tab("mode", "groups"); } if (@glist > $config{'display_max'}) { # Display group search form print "<b>$text{'index_gtoomany'}</b><p>\n"; print &ui_form_start("search_group.cgi"); print &ui_table_start($text{'index_gsheader'}, undef, 2); # Field to search print &ui_table_row($text{'index_gfind'}, &ui_select("field", "group", [ [ "group", $text{'gedit_group'} ], [ "members", $text{'gedit_members'} ], [ "gedit_gid", $text{'gedit_gid'} ] ])." ". &ui_select("match", 4, $match_modes)); # Text print &ui_table_row($text{'index_ftext'}, &ui_textbox("what", undef, 50)); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'find'} ] ]); $formno++; } elsif (@glist) { @glist = &sort_groups(\@glist, $config{'sort_mode'}); if ($config{'display_mode'} == 1) { # Display group name, ID and members @b = &get_group_buttons(); @left = grep { !/gbatch_form|gexport_form/ } @b; @right = grep { /gbatch_form|gexport_form/ } @b; &groups_table(\@glist, $formno++, 0, \@left, \@right); $no_group_buttons = 1; } else { # Just display group names @grid = map { &group_link($_) } @glist; print &ui_grid_table(\@grid, 4, 100, \@quarters, undef, $text{'index_groups'}); } } elsif ($access{'gcreate'} == 1) { if (@allglist) { print "<b>$text{'index_notgroups'}</b>. <p>\n"; } else { print "<b>$text{'index_notgroups2'}</b>. <p>\n"; } } &show_group_buttons() if (!$no_group_buttons); # End of groups tab if ($can_groups) { print &ui_tabs_end_tab("mode", "groups"); } print &ui_tabs_end(1); # Buttons to show recent logins and logged-in users if ($access{'logins'}) { print &ui_hr(); print &ui_buttons_start(); # Show recent logins print &ui_buttons_row( "list_logins.cgi", $text{'index_logins'}, $text{'index_loginsdesc'}, undef, &ui_radio("username_def", 1, [ [ 1, $text{'index_loginsall'} ], [ 0, $text{'index_loginsuser'}." ". &ui_user_textbox("username", undef, $formno) ] ])); # Show currently logged in user if (defined(&logged_in_users)) { print &ui_buttons_row( "list_who.cgi", $text{'index_who'}, $text{'index_whodesc'}, ); } print &ui_buttons_end(); } &ui_print_footer("/", $text{'index'}); sub get_user_buttons { local @rv; if ($access{'ucreate'}) { local $cancreate; if ($access{'hiuid'} && !$access{'umultiple'}) { foreach $u (@allulist) { $useduid{$u->{'uid'}}++; } for($i=int($access{'lowuid'}); $i<=$access{'hiuid'}; $i++) { if (!$useduid{$i}) { $cancreate = 1; last; } } } else { $cancreate = 1; } if ($cancreate) { push(@rv, &ui_link("edit_user.cgi", $text{'index_createuser'}) ); } else { push(@rv, $text{'index_nomoreusers'}); } } push(@rv, &ui_link("batch_form.cgi", $text{'index_batch'}) ) if ($access{'batch'}); push(@rv, &ui_link("export_form.cgi", $text{'index_export'}) ) if ($access{'export'}); return @rv; } sub show_user_buttons { local @b = &get_user_buttons(); local @left = grep { !/batch_form|export_form/ } @b; local @right = grep { /batch_form|export_form/ } @b; local @grid = ( &ui_links_row(\@left), &ui_links_row(\@right) ); print &ui_grid_table(\@grid, 2, 100, [ "align=left", "align=right" ]); } sub get_group_buttons { local @rv; if ($access{'gcreate'} == 1) { local $cancreate; if ($access{'higid'} && !$access{'gmultiple'}) { for($i=int($access{'lowgid'}); $i<=$access{'higid'}; $i++) { if (!$usedgid{$i}) { $cancreate = 1; last; } } } else { $cancreate = 1; } if ($cancreate) { push(@rv, &ui_link("edit_group.cgi", $text{'index_creategroup'}) ); } else { push(@rv, $text{'index_nomoregroups'}); } } push(@rv, &ui_link("gbatch_form.cgi", $text{'index_batch'}) ) if ($access{'batch'}); push(@rv, &ui_link("gexport_form.cgi", $text{'index_export'}) ) if ($access{'export'}); return @rv; } sub show_group_buttons { local @b = &get_group_buttons(); local @left = grep { !/gbatch_form|gexport_form/ } @b; local @right = grep { /gbatch_form|gexport_form/ } @b; local @grid = ( &ui_links_row(\@left), &ui_links_row(\@right) ); print &ui_grid_table(\@grid, 2, 100, [ "align=left", "align=right" ]); }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
CHANGELOG | File | 5.66 KB | 0644 |
|
acl_security.pl | File | 13.74 KB | 0755 |
|
aix-lib.pl | File | 1.17 KB | 0755 |
|
backup_config.pl | File | 749 B | 0755 |
|
batch_exec.cgi | File | 17.21 KB | 0755 |
|
batch_form.cgi | File | 2.42 KB | 0755 |
|
cgi_args.pl | File | 477 B | 0755 |
|
config-aix | File | 703 B | 0644 |
|
config-cobalt-linux | File | 710 B | 0644 |
|
config-coherent-linux | File | 657 B | 0644 |
|
config-corel-linux | File | 665 B | 0644 |
|
config-debian-linux | File | 665 B | 0644 |
|
config-freebsd | File | 684 B | 0644 |
|
config-generic-linux | File | 677 B | 0644 |
|
config-gentoo-linux | File | 637 B | 0644 |
|
config-hpux | File | 579 B | 0644 |
|
config-irix | File | 757 B | 0644 |
|
config-macos | File | 581 B | 0644 |
|
config-mandrake-linux | File | 662 B | 0644 |
|
config-msc-linux | File | 657 B | 0644 |
|
config-netbsd | File | 623 B | 0644 |
|
config-open-linux | File | 687 B | 0644 |
|
config-openSUSE-Linux-15.0-ALL | File | 715 B | 0644 |
|
config-openbsd | File | 636 B | 0644 |
|
config-openmamba-linux | File | 657 B | 0644 |
|
config-openserver | File | 841 B | 0644 |
|
config-osf1 | File | 579 B | 0644 |
|
config-pardus-linux | File | 665 B | 0644 |
|
config-redhat-linux-15.0-ALL | File | 659 B | 0644 |
|
config-redhat-linux-ALL-14.9 | File | 657 B | 0644 |
|
config-slackware-linux | File | 663 B | 0644 |
|
config-sol-linux | File | 657 B | 0644 |
|
config-solaris | File | 631 B | 0644 |
|
config-suse-linux | File | 677 B | 0644 |
|
config-suse-linux-9.0-ALL | File | 715 B | 0644 |
|
config-trustix-linux | File | 657 B | 0644 |
|
config-turbo-linux | File | 677 B | 0644 |
|
config-united-linux | File | 677 B | 0644 |
|
config-unixware | File | 595 B | 0644 |
|
config.info | File | 4.05 KB | 0644 |
|
config.info.bg | File | 7.87 KB | 0644 |
|
config.info.ca | File | 4.82 KB | 0644 |
|
config.info.cs | File | 4.21 KB | 0644 |
|
config.info.da | File | 3.7 KB | 0644 |
|
config.info.de | File | 4.65 KB | 0644 |
|
config.info.es | File | 4.34 KB | 0644 |
|
config.info.fa | File | 6.04 KB | 0644 |
|
config.info.fr | File | 2.77 KB | 0644 |
|
config.info.hu | File | 0 B | 0644 |
|
config.info.ja | File | 4.96 KB | 0644 |
|
config.info.nl | File | 4.61 KB | 0644 |
|
config.info.no | File | 4.12 KB | 0644 |
|
config.info.pl | File | 3.01 KB | 0644 |
|
config.info.pt_BR | File | 4.36 KB | 0644 |
|
config.info.ru | File | 4.61 KB | 0644 |
|
config.info.sv | File | 1.06 KB | 0644 |
|
config.info.tr | File | 3.69 KB | 0644 |
|
config.info.uk | File | 4.58 KB | 0644 |
|
config.info.zh | File | 961 B | 0644 |
|
config.info.zh_TW | File | 909 B | 0644 |
|
cpan_modules.pl | File | 256 B | 0755 |
|
defaultacl | File | 358 B | 0644 |
|
delete_group.cgi | File | 2.18 KB | 0755 |
|
delete_user.cgi | File | 4.67 KB | 0755 |
|
edit_group.cgi | File | 4.97 KB | 0755 |
|
edit_user.cgi | File | 18.46 KB | 0755 |
|
export_exec.cgi | File | 2.9 KB | 0755 |
|
export_form.cgi | File | 1.77 KB | 0755 |
|
freebsd-lib.pl | File | 1.74 KB | 0755 |
|
gbatch_exec.cgi | File | 8.1 KB | 0755 |
|
gbatch_form.cgi | File | 1.59 KB | 0755 |
|
gexport_exec.cgi | File | 1.73 KB | 0755 |
|
gexport_form.cgi | File | 1.26 KB | 0755 |
|
help.html | File | 6.79 KB | 0644 |
|
hpux-lib.pl | File | 1.02 KB | 0755 |
|
index.cgi | File | 7.38 KB | 0755 |
|
irix-lib.pl | File | 1.09 KB | 0755 |
|
linux-lib.pl | File | 4.75 KB | 0755 |
|
list_logins.cgi | File | 1.55 KB | 0755 |
|
list_who.cgi | File | 945 B | 0755 |
|
log_parser.pl | File | 1.68 KB | 0755 |
|
macos-lib.pl | File | 3.15 KB | 0755 |
|
mass_delete_group.cgi | File | 2.41 KB | 0755 |
|
mass_delete_user.cgi | File | 7.65 KB | 0755 |
|
md5-lib.pl | File | 7.58 KB | 0755 |
|
module.info | File | 544 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 155 B | 0644 |
|
module.info.ar | File | 173 B | 0644 |
|
module.info.ar.auto | File | 34 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 247 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 228 B | 0644 |
|
module.info.ca | File | 117 B | 0644 |
|
module.info.ca.auto | File | 27 B | 0644 |
|
module.info.cs | File | 30 B | 0644 |
|
module.info.cs.auto | File | 134 B | 0644 |
|
module.info.da | File | 27 B | 0644 |
|
module.info.da.auto | File | 116 B | 0644 |
|
module.info.de | File | 133 B | 0644 |
|
module.info.de.auto | File | 25 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 258 B | 0644 |
|
module.info.es | File | 26 B | 0644 |
|
module.info.es.auto | File | 136 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 175 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 220 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 156 B | 0644 |
|
module.info.fr | File | 32 B | 0644 |
|
module.info.fr.auto | File | 154 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 182 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 147 B | 0644 |
|
module.info.hu | File | 37 B | 0644 |
|
module.info.hu.auto | File | 156 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 129 B | 0644 |
|
module.info.ja | File | 39 B | 0644 |
|
module.info.ja.auto | File | 175 B | 0644 |
|
module.info.ko | File | 29 B | 0644 |
|
module.info.ko.auto | File | 142 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 166 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 167 B | 0644 |
|
module.info.ms | File | 124 B | 0644 |
|
module.info.ms.auto | File | 26 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 133 B | 0644 |
|
module.info.nl | File | 30 B | 0644 |
|
module.info.nl.auto | File | 123 B | 0644 |
|
module.info.no | File | 27 B | 0644 |
|
module.info.no.auto | File | 116 B | 0644 |
|
module.info.pl | File | 122 B | 0644 |
|
module.info.pl.auto | File | 31 B | 0644 |
|
module.info.pt | File | 30 B | 0644 |
|
module.info.pt.auto | File | 124 B | 0644 |
|
module.info.pt_BR | File | 30 B | 0644 |
|
module.info.pt_BR.auto | File | 130 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 167 B | 0644 |
|
module.info.ru | File | 49 B | 0644 |
|
module.info.ru.auto | File | 208 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 177 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 163 B | 0644 |
|
module.info.sv | File | 31 B | 0644 |
|
module.info.sv.auto | File | 128 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 260 B | 0644 |
|
module.info.tr | File | 31 B | 0644 |
|
module.info.tr.auto | File | 147 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 247 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 232 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 177 B | 0644 |
|
module.info.zh | File | 24 B | 0644 |
|
module.info.zh.auto | File | 103 B | 0644 |
|
module.info.zh_TW | File | 30 B | 0644 |
|
module.info.zh_TW.auto | File | 109 B | 0644 |
|
my_group_chooser.cgi | File | 6.9 KB | 0755 |
|
my_user_chooser.cgi | File | 6.56 KB | 0755 |
|
netbsd-lib.pl | File | 1.74 KB | 0755 |
|
openbsd-lib.pl | File | 1.74 KB | 0755 |
|
openserver-lib.pl | File | 1.18 KB | 0755 |
|
osf1-lib.pl | File | 1.01 KB | 0755 |
|
prefs.info | File | 134 B | 0644 |
|
rbac-mapping | File | 190 B | 0644 |
|
save_group.cgi | File | 4.86 KB | 0755 |
|
save_user.cgi | File | 20.39 KB | 0755 |
|
search_group.cgi | File | 991 B | 0755 |
|
search_user.cgi | File | 1.33 KB | 0755 |
|
solaris-lib.pl | File | 1.78 KB | 0755 |
|
unixware-lib.pl | File | 1.13 KB | 0755 |
|
user-lib.pl | File | 71.71 KB | 0755 |
|