1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r23712: This script allows for adding lists of users (or other objects)

to lists of groups (or aliases). Useful for creating large test
scenarios.

Michael
(This used to be commit 0c03c78af8)
This commit is contained in:
Michael Adam 2007-07-05 00:07:40 +00:00 committed by Gerald (Jerry) Carter
parent 4b1fbd17c4
commit 459d01489f

View File

@ -0,0 +1,17 @@
#!/usr/bin/perl
use strict;
my $dc = "192.168.45.44";
my $adminuser = "administrator";
my $adminpw = "geheim";
my $maxgroups = 5000;
my $startgroup = 0;
my $rpccli_cmd = "/usr/bin/rpcclient";
my $testuser = "testgroups";
for (my $num = $startgroup; $num <= $maxgroups; ++$num) {
my $group = sprintf "%s%.05d", "group", $num;
print "adding user $testuser to group $group\n";
system("net rpc -I $dc -U$adminuser\%$adminpw group addmem $group $testuser");
}