mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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 <tridge@samba.org>
This commit is contained in:
parent
31ade9c122
commit
901959d9ca
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user