createDisabledAutoUserCreationList.pl #1

  • //
  • guest/
  • tom_roffe/
  • releases/
  • p4dauc/
  • r0.1/
  • createDisabledAutoUserCreationList.pl
  • View
  • Commits
  • Open Download .zip Download (531 B)
#!/usr/bin/perl

print "List Generator for Disabling Auto User Creation\n\n";


@users = `p4 users -m 100 | cut -d " " -f 1`;
$org_group = `p4 group -o allusers`;

$group_list = strip_whitespace($org_group);

foreach my $user (@users) {
	print "Adding User: \"" . strip_whitespace($user) . "\" to \"allusers\" Group\n";
	$group_list .= "\t" . strip_whitespace($user) . "\n"; 
}

#print $group_list;


# Functions Subsection

sub strip_whitespace {
	my($string) = @_;
	$string =~ s/^\s+//;
	$string =~ s/\s+$//;
	return $string;
}

# Change User Description Committed
#1 6376 Tom Roffe Inital Branch for r0.1 from dev for Disable Auto User Creation
Group Generator Script
//guest/tom_roffe/dev/p4dauc/createDisabledAutoUserCreationList.pl
#2 6370 Tom Roffe Small Changes to Print Std::Out statments
#1 6366 Tom Roffe Inital Creatation of Disable Auto User Creation List Script