Commit de29fa01 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add admin group (TBADMINGROUP from the defs file) to the group set

for admin types. This is independent of the unix groups table, but
I check it for a duplicate just in case.
parent 4c40a541
......@@ -30,6 +30,7 @@ my $TB = "@prefix@";
my $SSH = "$TB/bin/sshtb";
my $USERMOD = "/usr/sbin/pw usermod";
......@@ -275,7 +276,20 @@ foreach my $uid (@userlist) {
# users can have more unix groups than just the projects/groups they are
# in. These groups must already exist.
if ((my @extragrouplist = TBUnixGroupList($uid))) {
my @extragrouplist = TBUnixGroupList($uid);
# Add special admin group. Check to make sure that its not a dup
# since the above mechanism could cause a duplicate entry. No big
# deal to catch it.
if (TBAdmin($uid)) {
if (! grep(/^${ADMINGRP}$/, @extragrouplist)) {
push(@extragrouplist, $ADMINGRP);
if (@extragrouplist) {
print "Adding extra groups to list: @extragrouplist\n";
if ($grouplist) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment