summaryrefslogtreecommitdiff
path: root/wintest
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-08 08:21:40 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-08 05:26:05 +0100
commit9013f93df147de8c5f3c8bf821765053c29abbe8 (patch)
tree3b2bbc68874289602b479d0d734a45a23402d84a /wintest
parent545932fda590d4c888c0f60fed7a36c1659f0018 (diff)
downloadsamba-9013f93df147de8c5f3c8bf821765053c29abbe8.tar.gz
samba-9013f93df147de8c5f3c8bf821765053c29abbe8.tar.bz2
samba-9013f93df147de8c5f3c8bf821765053c29abbe8.zip
wintest: use --add-ref for RODC replication
this forces the creation of the repsTo attribute, and allows more complete testing of RODC replication
Diffstat (limited to 'wintest')
-rwxr-xr-xwintest/test-s4-howto.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index db699fd058..2dbb208dba 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -523,10 +523,11 @@ def test_dcpromo_rodc(t, vm):
t.info("Checking the w2k8 RODC join is OK")
t.chdir('${PREFIX}')
t.port_wait("${WIN_IP}", 139)
+ child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}", set_time=True)
+ child.sendline("ipconfig /registerdns")
t.retry_cmd('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
t.cmd_contains("host -t A ${WIN_HOSTNAME}.${LCREALM}.", ['has address'])
t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
- child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}", set_time=True)
child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
child.expect("The command completed successfully")
@@ -539,11 +540,25 @@ def test_dcpromo_rodc(t, vm):
child.expect("CN=Configuration,${BASEDN}")
child.expect("was successful")
+ for nc in [ '${BASEDN}', 'CN=Configuration,${BASEDN}', 'CN=Schema,CN=Configuration,${BASEDN}' ]:
+ t.cmd_contains("bin/samba-tool drs replicate --add-ref ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} %s" % nc, ["was successful"])
+
+ t.cmd_contains("bin/samba-tool drs showrepl ${HOSTNAME}.${LCREALM}",
+ [ "INBOUND NEIGHBORS",
+ "OUTBOUND NEIGHBORS",
+ "${BASEDN}",
+ "Last attempt.*was successful",
+ "CN=Configuration,${BASEDN}",
+ "Last attempt.*was successful",
+ "CN=Configuration,${BASEDN}",
+ "Last attempt.*was successful" ],
+ ordered=True,
+ regex=True)
+
t.info("Checking if new users are available on windows")
t.run_cmd('bin/samba-tool newuser test2 ${PASSWORD2}')
t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
- t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
- t.retry_cmd("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} ${BASEDN} -k yes", ["was successful"])
+ 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'])
t.run_cmd('bin/samba-tool user delete test2 -Uadministrator@${LCREALM}%${PASSWORD1}')
t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])