3 # List all existing Samba groups
5 require './samba-lib.pl';
7 $access{'maint_groups'} || &error($text{'groups_ecannot'});
8 &ui_print_header(undef, $text{'groups_title'}, "");
10 &check_group_enabled($text{'groups_cannot'});
12 @groups = &list_groups();
14 @groups = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @groups
15 if ($config{'sort_mode'});
16 print "<a href='edit_group.cgi?new=1'>$text{'groups_add'}</a><br>\n";
17 print "<table border width=100%>\n";
18 print "<tr $tb> <td><b>$text{'groups_name'}</b></td> ",
19 "<td><b>$text{'groups_unix'}</b></td> ",
20 "<td><b>$text{'groups_type'}</b></td> ",
21 "<td><b>$text{'groups_sid'}</b></td> </tr>\n";
22 foreach $g (@groups) {
24 print "<td><a href='edit_group.cgi?idx=$g->{'index'}'>",
25 "$g->{'name'}</a></td>\n";
26 print "<td>",$g->{'unix'} == -1 ? $text{'groups_nounix'} :
27 "<tt>$g->{'unix'}</tt>","</td>\n";
28 print "<td>",$text{'groups_type_'.$g->{'type'}} ||
29 $g->{'type'},"</td>\n";
30 print "<td><tt>$g->{'sid'}</tt></td>\n";
36 print "<b>$text{'groups_none'}</b><p>\n";
38 print "<a href='edit_group.cgi?new=1'>$text{'groups_add'}</a><p>\n";
40 &ui_print_footer("", $text{'index_sharelist'});