From 901959d9ca4ba09f03367024c3ab74cc6fb86d78 Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Wed, 27 Jul 2011 15:44:34 -0400 Subject: samba-tool: updated test suite to account for newuser change 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 --- source4/setup/tests/blackbox_group.sh | 4 ++-- source4/setup/tests/blackbox_newuser.sh | 4 ++-- source4/setup/tests/blackbox_setpassword.sh | 2 +- testprogs/blackbox/test_export_keytab.sh | 2 +- testprogs/blackbox/test_ktpass.sh | 2 +- testprogs/blackbox/test_passwords.sh | 2 +- wintest/test-s4-howto.py | 12 ++++++------ 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source4/setup/tests/blackbox_group.sh b/source4/setup/tests/blackbox_group.sh index 1a9e26bd04..6c58e91dfd 100755 --- a/source4/setup/tests/blackbox_group.sh +++ b/source4/setup/tests/blackbox_group.sh @@ -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 diff --git a/source4/setup/tests/blackbox_newuser.sh b/source4/setup/tests/blackbox_newuser.sh index 3f3e2bd3fb..c6046846ea 100755 --- a/source4/setup/tests/blackbox_newuser.sh +++ b/source4/setup/tests/blackbox_newuser.sh @@ -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 diff --git a/source4/setup/tests/blackbox_setpassword.sh b/source4/setup/tests/blackbox_setpassword.sh index 84194e8465..8858767ef7 100755 --- a/source4/setup/tests/blackbox_setpassword.sh +++ b/source4/setup/tests/blackbox_setpassword.sh @@ -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 diff --git a/testprogs/blackbox/test_export_keytab.sh b/testprogs/blackbox/test_export_keytab.sh index fc25a9f807..81db520441 100755 --- a/testprogs/blackbox/test_export_keytab.sh +++ b/testprogs/blackbox/test_export_keytab.sh @@ -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 diff --git a/testprogs/blackbox/test_ktpass.sh b/testprogs/blackbox/test_ktpass.sh index 33adba4271..348916d779 100755 --- a/testprogs/blackbox/test_ktpass.sh +++ b/testprogs/blackbox/test_ktpass.sh @@ -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 diff --git a/testprogs/blackbox/test_passwords.sh b/testprogs/blackbox/test_passwords.sh index dc5eaa1a3b..179aec35c1 100755 --- a/testprogs/blackbox/test_passwords.sh +++ b/testprogs/blackbox/test_passwords.sh @@ -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 diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index abd6eebccd..294a94e748 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -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") -- cgit