5 Usage: blackbox_group.sh PREFIX
13 .
`dirname $0`/..
/..
/..
/testprogs
/blackbox
/subunit.sh
16 rm -rf $PREFIX/simple-dc
17 testit
"simple-dc" $PYTHON $SRCDIR/source4/setup
/provision
--server-role="dc" --domain=FOO
--realm=foo.example.com
--domain-sid=S-1-5-21-4177067393-1453636373-93818738
--targetdir=$PREFIX/simple-dc
18 samba_tool
="./bin/samba-tool"
20 CONFIG
="--configfile=$PREFIX/simple-dc/etc/smb.conf"
22 #creation of two test subjects
23 testit
"user add" $samba_tool user create
$CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
24 testit
"user add" $samba_tool user create
$CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
26 #test creation of six different groups
27 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Domain' --group-type='Security' --description='DomainSecurityGroup' --mail-address='dsg@samba.org' --notes='Notes' dsg
28 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Global' --group-type='Security' --description='GlobalSecurityGroup' --mail-address='gsg@samba.org' --notes='Notes' gsg
29 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Universal' --group-type='Security' --description='UniversalSecurityGroup' --mail-address='usg@samba.org' --notes='Notes' usg
30 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Domain' --group-type='Distribution' --description='DomainDistributionGroup' --mail-address='ddg@samba.org' --notes='Notes' ddg
31 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Global' --group-type='Distribution' --description='GlobalDistributionGroup' --mail-address='gdg@samba.org' --notes='Notes' gdg
32 testit
"group add" $samba_tool group add
$CONFIG --group-scope='Universal' --group-type='Distribution' --description='UniversalDistributionGroup' --mail-address='udg@samba.org' --notes='Notes' udg
34 #test adding test users to all groups by their username
35 testit
"group addmembers" $samba_tool group addmembers
$CONFIG dsg newuser
,newuser1
36 testit
"group addmembers" $samba_tool group addmembers
$CONFIG gsg newuser
,newuser1
37 testit
"group addmembers" $samba_tool group addmembers
$CONFIG usg newuser
,newuser1
38 testit
"group addmembers" $samba_tool group addmembers
$CONFIG ddg newuser
,newuser1
39 testit
"group addmembers" $samba_tool group addmembers
$CONFIG gdg newuser
,newuser1
40 testit
"group addmembers" $samba_tool group addmembers
$CONFIG udg newuser
,newuser1
42 #test removing test users from all groups by their username
43 testit
"group removemembers" $samba_tool group removemembers
$CONFIG dsg newuser
,newuser1
44 testit
"group removemembers" $samba_tool group removemembers
$CONFIG gsg newuser
,newuser1
45 testit
"group removemembers" $samba_tool group removemembers
$CONFIG usg newuser
,newuser1
46 testit
"group removemembers" $samba_tool group removemembers
$CONFIG ddg newuser
,newuser1
47 testit
"group removemembers" $samba_tool group removemembers
$CONFIG gdg newuser
,newuser1
48 testit
"group removemembers" $samba_tool group removemembers
$CONFIG udg newuser
,newuser1
50 #test adding test users to all groups by their cn
51 #testit "group addmembers" $samba_tool group addmembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
52 #testit "group addmembers" $samba_tool group addmembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
53 #testit "group addmembers" $samba_tool group addmembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
54 #testit "group addmembers" $samba_tool group addmembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
55 #testit "group addmembers" $samba_tool group addmembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
56 #testit "group addmembers" $samba_tool group addmembers $CONFIG udg "User UT. Tester,User1 UT. Tester"
58 #test removing test users from all groups by their cn
59 #testit "group removemembers" $samba_tool group removemembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
60 #testit "group removemembers" $samba_tool group removemembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
61 #testit "group removemembers" $samba_tool group removemembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
62 #testit "group removemembers" $samba_tool group removemembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
63 #testit "group removemembers" $samba_tool group removemembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
64 #testit "group removemembers" $samba_tool group removemembers $CONFIG ugg "User UT. Tester,User1 UT. Tester"
66 #test deletion of the groups
67 testit
"group delete" $samba_tool group delete
$CONFIG dsg
68 testit
"group delete" $samba_tool group delete
$CONFIG gsg
69 testit
"group delete" $samba_tool group delete
$CONFIG usg
70 testit
"group delete" $samba_tool group delete
$CONFIG ddg
71 testit
"group delete" $samba_tool group delete
$CONFIG gdg
72 testit
"group delete" $samba_tool group delete
$CONFIG udg
74 #test listing of all groups
75 testit
"group list" $samba_tool group list
$CONFIG
77 #test listing of members of a particular group
78 testit
"group listmembers" $samba_tool group listmembers
$CONFIG Users