samba-tool: updated test suite to account for newuser change
authorGiampaolo Lauria <lauria2@yahoo.com>
Wed, 27 Jul 2011 19:44:34 +0000 (15:44 -0400)
committerAndrew Tridgell <tridge@samba.org>
Thu, 28 Jul 2011 05:20:51 +0000 (15:20 +1000)
Updated test suite invocations of newuser to "user add" as
the newuser functionality is now being moved to "user add"

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/setup/tests/blackbox_group.sh
source4/setup/tests/blackbox_newuser.sh
source4/setup/tests/blackbox_setpassword.sh
testprogs/blackbox/test_export_keytab.sh
testprogs/blackbox/test_ktpass.sh
testprogs/blackbox/test_passwords.sh
wintest/test-s4-howto.py

index 1a9e26b..6c58e91 100755 (executable)
@@ -20,8 +20,8 @@ samba_tool="./bin/samba-tool"
 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 
 #creation of two test subjects
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
 
 #test creation of six different groups
 testit "group add" $samba_tool group add $CONFIG --group-scope='Domain' --group-type='Security' --description='DomainSecurityGroup' --mail-address='dsg@samba.org' --notes='Notes' dsg
index 3f3e2bd..c604684 100755 (executable)
@@ -22,8 +22,8 @@ CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 #two test for creating new user
 #newuser  account is created with cn=Given Name Initials. Surname
 #newuser1 account is created using cn=username
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
-testit "newuser" $samba_tool newuser $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
 
 # check the enable account script
 testit "enableaccount" $samba_tool user enable $CONFIG NewUser
index 84194e8..8858767 100755 (executable)
@@ -17,7 +17,7 @@ samba_tool="./bin/samba-tool"
 rm -rf $PREFIX/simple-dc
 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
 
-testit "newuser" $samba_tool newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
+testit "user add" $samba_tool user add --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
 
 testit "setpassword" $samba_tool user setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd
 
index fc25a9f..81db520 100755 (executable)
@@ -22,7 +22,7 @@ samba4bindir="$BINDIR"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
-newuser="$samba_tool newuser"
+newuser="$samba_tool user add"
 
 . `dirname $0`/subunit.sh
 
index 33adba4..348916d 100755 (executable)
@@ -21,7 +21,7 @@ CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
 
 TESTUSER="ktpassUser"
 
-testit "newuser" $samba_tool newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
+testit "user add" $samba_tool user add $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
 
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
index dc5eaa1..179aec3 100755 (executable)
@@ -25,7 +25,7 @@ samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
-newuser="$samba_tool newuser"
+newuser="$samba_tool user add"
 
 . `dirname $0`/subunit.sh
 
index abd6eeb..294a94e 100755 (executable)
@@ -39,8 +39,8 @@ def provision_s4(t, func_level="2008"):
     if t.getvar('INTERFACE_IPV6'):
         provision.append('--host-ip6=${INTERFACE_IPV6}')
     t.run_cmd(provision)
-    t.run_cmd('bin/samba-tool newuser testallowed ${PASSWORD1}')
-    t.run_cmd('bin/samba-tool newuser testdenied ${PASSWORD1}')
+    t.run_cmd('bin/samba-tool user add testallowed ${PASSWORD1}')
+    t.run_cmd('bin/samba-tool user add testdenied ${PASSWORD1}')
     t.run_cmd('bin/samba-tool group addmembers "Allowed RODC Password Replication Group" testallowed')
 
 
@@ -259,7 +259,7 @@ def test_dcpromo(t, vm):
     child.expect("was successful")
 
     t.info("Checking if new users propogate to windows")
-    t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
+    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
 
@@ -373,7 +373,7 @@ def test_dcpromo_rodc(t, vm):
                    regex=True)
 
     t.info("Checking if new users are available on windows")
-    t.run_cmd('bin/samba-tool newuser test2 ${PASSWORD2}')
+    t.run_cmd('bin/samba-tool user add test2 ${PASSWORD2}')
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} ${BASEDN}", ["was successful"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
@@ -445,7 +445,7 @@ def test_join_as_dc(t, vm):
     child.expect("was successful")
 
     t.info("Checking if new users propogate to windows")
-    t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
+    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
 
@@ -528,7 +528,7 @@ def test_join_as_rodc(t, vm):
 
     # should this work?
     t.info("Checking if new users propogate to windows")
-    t.cmd_contains('bin/samba-tool newuser test2 ${PASSWORD2}', ['No RID Set DN'])
+    t.cmd_contains('bin/samba-tool user add test2 ${PASSWORD2}', ['No RID Set DN'])
 
     t.info("Checking propogation of user deletion")
     child.sendline("net user test3 /del")