[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Thu Nov 18 15:57:03 MST 2010
The branch, master has been updated
via 58c43f7 s4-wintest: reliability and usability improvements
via 5b3981a s4-rodc: enable the DRS_GET_ALL_GROUP_MEMBERSHIP flag for RODC replication
via 96e55cb s4-join: initially disable the machine account
via 6a41afb s4-drs: fixed a typo
via 5be4bfd s4-wintest: remove files in var/ when reprovisioning
via 27c3bc8 s4-test: added --rebase and --clean options
via 498f3c8 s4-test: use --fail-immediately for samba_dnsupdate testing
via 3f952ab s4-spnupdate: only enable NDR print at log level above 5
via 1ce2230 s4-dns: added support for --fail-immediately for RODC netlogon dns updates
from ab379dd s4-ldb.python: Use $SELFTEST_PREFIX/tmp as a temporary directory for testing
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 58c43f74b9bc2d660f58ccfe912bd3fff7cf672e
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 23:56:22 2010 +1100
s4-wintest: reliability and usability improvements
- allow for missing VMs
- improved VM names
- added join of w2k3 to Samba domain
- cope with w2k3 dcpromo output
- wait for port 139 not 23, to avoid windows telnet server bug
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Thu Nov 18 23:56:11 CET 2010 on sn-devel-104
commit 5b3981acb1e0e0ef6832c1147b1ec5b3659c1aa9
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 18:48:42 2010 +1100
s4-rodc: enable the DRS_GET_ALL_GROUP_MEMBERSHIP flag for RODC replication
see the description of this flag in [MS-DRSR]
commit 96e55cb1324992607f0abac4b1d63db6beb5341b
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 18:48:03 2010 +1100
s4-join: initially disable the machine account
enable after a password is set
commit 6a41afba68f5d787b337fac825365a35c01f844a
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 18:47:21 2010 +1100
s4-drs: fixed a typo
commit 5be4bfdc376ec518c2c1ec10946335f7741f847d
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 18:47:07 2010 +1100
s4-wintest: remove files in var/ when reprovisioning
commit 27c3bc8c013a75f6b437a2e47b10ec4fb6a2920b
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 15:27:45 2010 +1100
s4-test: added --rebase and --clean options
commit 498f3c8e5fb64e566ee783893c9e0663add3b25f
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 15:27:20 2010 +1100
s4-test: use --fail-immediately for samba_dnsupdate testing
commit 3f952aba2b98ef6dd00861c079b388c8f1652beb
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 15:26:48 2010 +1100
s4-spnupdate: only enable NDR print at log level above 5
commit 1ce223017df86b35003a21198b388396e45a2f4d
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Nov 18 14:53:20 2010 +1100
s4-dns: added support for --fail-immediately for RODC netlogon dns updates
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/kcc/kcc_periodic.c | 1 +
source4/scripting/bin/samba_dnsupdate | 7 +
source4/scripting/bin/samba_spnupdate | 5 +-
source4/scripting/devel/wintest/test-howto.py | 200 +++++++++++++++----------
source4/scripting/devel/wintest/tridge.conf | 63 ++++----
source4/scripting/devel/wintest/wintest.py | 38 ++++--
source4/scripting/python/samba/drs_utils.py | 2 +-
source4/scripting/python/samba/join.py | 12 ++-
8 files changed, 205 insertions(+), 123 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index fa2b067..e0ac2c7 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -171,6 +171,7 @@ static uint32_t kccsrv_replica_flags(struct kccsrv_service *s)
DRSUAPI_DRS_PER_SYNC |
DRSUAPI_DRS_ADD_REF |
DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING |
+ DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP |
DRSUAPI_DRS_NONGC_RO_REP;
}
return DRSUAPI_DRS_INIT_SYNC |
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 1b5bc3e..8f04895 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -301,12 +301,19 @@ def rodc_dns_update(d, t):
dns_names.names = [ name ]
site_name = sub_vars['SITE'].decode('utf-8')
+ global error_count
+
try:
ret_names = w.DsrUpdateReadOnlyServerDnsRecords(site_name, default_ttl, dns_names)
if ret_names.names[0].status != 0:
print("Failed to set DNS entry: %s (status %u)" % (d, ret_names.names[0].status))
+ error_count = error_count + 1
except RuntimeError, reason:
print("Error setting DNS entry of type %u: %s: %s" % (t, d, reason))
+ error_count = error_count + 1
+
+ if error_count != 0 and opts.fail_immediately:
+ sys.exit(1)
def call_rodc_update(d):
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
index 7a4de7a..0dcc9fe 100755
--- a/source4/scripting/bin/samba_spnupdate
+++ b/source4/scripting/bin/samba_spnupdate
@@ -195,7 +195,10 @@ def call_rodc_update(d):
sys.exit(1)
server = cldap_ret.pdc_dns_name
try:
- drs = drsuapi.drsuapi('ncacn_ip_tcp:%s[seal,print]' % server, lp, creds)
+ binding_options = "seal"
+ if lp.get("log level") >= 5:
+ binding_options += ",print"
+ drs = drsuapi.drsuapi('ncacn_ip_tcp:%s[%s]' % (server, binding_options), lp, creds)
(drs_handle, supported_extensions) = drs_utils.drs_DsBind(drs)
except Exception, reason:
print("Unable to connect to DC '%s' for domain '%s' : %s" % (server, domain, reason))
diff --git a/source4/scripting/devel/wintest/test-howto.py b/source4/scripting/devel/wintest/test-howto.py
index c53fc51..402519f 100755
--- a/source4/scripting/devel/wintest/test-howto.py
+++ b/source4/scripting/devel/wintest/test-howto.py
@@ -26,12 +26,16 @@ def build_s4(t):
t.run_cmd('rm -rf ${PREFIX}')
t.run_cmd('make -j install')
-def provision_s4(t):
+def provision_s4(t, func_level="2008", interfaces=None):
'''provision s4 as a DC'''
t.info('Provisioning s4')
t.chdir('${PREFIX}')
t.run_cmd("rm -rf etc private")
- t.run_cmd('sbin/provision --realm=${LCREALM} --domain=${DOMAIN} --adminpass=${PASSWORD1} --server-role="domain controller" --function-level=2008 -d${DEBUGLEVEL}')
+ t.run_cmd("find var -type f | xargs rm -f")
+ options=' --function-level=%s -d${DEBUGLEVEL}' % func_level
+ if interfaces:
+ options += ' --option=interfaces=%s' % interfaces
+ t.run_cmd('sbin/provision --realm=${LCREALM} --domain=${DOMAIN} --adminpass=${PASSWORD1} --server-role="domain controller"' + options)
t.run_cmd('bin/samba-tool newuser testallowed ${PASSWORD1}')
t.run_cmd('bin/samba-tool newuser testdenied ${PASSWORD1}')
t.run_cmd('bin/samba-tool group addmembers "Allowed RODC Password Replication Group" testallowed')
@@ -43,7 +47,7 @@ def start_s4(t, interfaces=None):
t.run_cmd(['sbin/samba',
'--option', 'panic action=gnome-terminal -e "gdb --pid %PID%"',
'--option', 'interfaces=%s' % interfaces])
- t.port_wait("localhost", 445)
+ t.port_wait("localhost", 139)
def test_smbclient(t):
t.info('Testing smbclient')
@@ -108,9 +112,9 @@ def test_kerberos(t):
def test_dyndns(t):
t.chdir('${PREFIX}')
- t.cmd_contains("sbin/samba_dnsupdate", [])
+ t.run_cmd("sbin/samba_dnsupdate --fail-immediately")
t.run_cmd("${RNDC} flush")
- t.cmd_contains("sbin/samba_dnsupdate --verbose", ["No DNS updates needed"])
+
def run_winjoin(t, vm):
t.setwinvars(vm)
@@ -119,26 +123,24 @@ def run_winjoin(t, vm):
t.vm_poweroff("${WIN_VM}", checkfail=False)
t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
t.ping_wait("${WIN_HOSTNAME}")
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_USER}", "${WIN_PASS}", set_time=True)
child.sendline("netdom join ${WIN_HOSTNAME} /Domain:${LCREALM} /PasswordD:${PASSWORD1} /UserD:administrator")
child.expect("The command completed successfully")
child.sendline("shutdown /r -t 0")
- t.port_wait("${WIN_HOSTNAME}", 23, wait_for_fail=True)
- t.port_wait("${WIN_HOSTNAME}", 23)
+ t.port_wait("${WIN_HOSTNAME}", 139, wait_for_fail=True)
+ t.port_wait("${WIN_HOSTNAME}", 139)
def test_winjoin(t, vm):
t.setwinvars(vm)
t.info("Checking the windows join is OK")
t.chdir('${PREFIX}')
- t.port_wait("${WIN_HOSTNAME}", 445)
+ t.port_wait("${WIN_HOSTNAME}", 139)
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"])
t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -k no -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -k yes -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}")
child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
child.expect("The command completed successfully")
@@ -153,11 +155,12 @@ def run_dcpromo(t, vm):
t.vm_poweroff("${WIN_VM}", checkfail=False)
t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
t.ping_wait("${WIN_HOSTNAME}")
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}")
child.sendline("copy /Y con answers.txt")
child.sendline('''
-[DCInstall]
+[DCINSTALL]
+RebootOnSuccess=Yes
+RebootOnCompletion=Yes
ReplicaOrNewDomain=Replica
ReplicaDomainDNSName=${LCREALM}
SiteName=Default-First-Site-Name
@@ -171,28 +174,27 @@ DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
SafeModeAdminPassword=${PASSWORD1}
-RebootOnCompletion=No
''')
child.expect("copied.")
+ child.expect("C:")
+ child.expect("C:")
child.sendline("dcpromo /answer:answers.txt")
- i = child.expect(["You must restart this computer", "failed"], timeout=120)
- if i != 0:
+ i = child.expect(["You must restart this computer", "failed", "C:"], timeout=120)
+ if i == 1:
raise Exception("dcpromo failed")
- child.sendline("shutdown -r -t 0")
- t.port_wait("${WIN_HOSTNAME}", 23, wait_for_fail=True)
- t.port_wait("${WIN_HOSTNAME}", 23)
+ t.port_wait("${WIN_HOSTNAME}", 139, wait_for_fail=True)
+ t.port_wait("${WIN_HOSTNAME}", 139)
def test_dcpromo(t, vm):
t.setwinvars(vm)
t.info("Checking the dcpromo join is OK")
t.chdir('${PREFIX}')
- t.port_wait("${WIN_HOSTNAME}", 445)
+ t.port_wait("${WIN_HOSTNAME}", 139)
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"])
- t.port_wait("${WIN_HOSTNAME}", 23)
t.cmd_contains("bin/samba-tool drs kcc ${HOSTNAME} -Uadministrator@${LCREALM}%${PASSWORD1}", ['Consistency check', 'successful'])
t.cmd_contains("bin/samba-tool drs kcc ${WIN_HOSTNAME} -Uadministrator@${LCREALM}%${PASSWORD1}", ['Consistency check', 'successful'])
@@ -205,28 +207,38 @@ def test_dcpromo(t, vm):
t.cmd_contains("bin/samba-tool drs showrepl ${HOSTNAME} -k yes",
[ "INBOUND NEIGHBORS",
"${BASEDN}",
- "Last attempt", "was successful",
- "CN=Schema,CN=Configuration,${BASEDN}",
- "Last attempt", "was successful",
+ "Last attempt .* was successful",
+ "CN=Configuration,${BASEDN}",
+ "Last attempt .* was successful",
+ "CN=Configuration,${BASEDN}", # cope with either order
+ "Last attempt .* was successful",
"OUTBOUND NEIGHBORS",
"${BASEDN}",
"Last success",
"CN=Configuration,${BASEDN}",
+ "Last success",
+ "CN=Configuration,${BASEDN}",
"Last success"],
- ordered=True)
+ ordered=True,
+ regex=True)
t.cmd_contains("bin/samba-tool drs showrepl ${WIN_HOSTNAME} -k yes",
[ "INBOUND NEIGHBORS",
"${BASEDN}",
- "Last attempt", "was successful",
- "CN=Schema,CN=Configuration,${BASEDN}",
- "Last attempt", "was successful",
+ "Last attempt .* was successful",
+ "CN=Configuration,${BASEDN}",
+ "Last attempt .* was successful",
+ "CN=Configuration,${BASEDN}",
+ "Last attempt .* was successful",
"OUTBOUND NEIGHBORS",
"${BASEDN}",
"Last success",
- "CN=Schema,CN=Configuration,${BASEDN}",
+ "CN=Configuration,${BASEDN}",
+ "Last success",
+ "CN=Configuration,${BASEDN}",
"Last success" ],
- ordered=True)
+ ordered=True,
+ regex=True)
child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}", set_time=True)
child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
@@ -278,7 +290,6 @@ def run_dcpromo_rodc(t, vm):
t.vm_poweroff("${WIN_VM}", checkfail=False)
t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
t.ping_wait("${WIN_HOSTNAME}")
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}")
child.sendline("copy /Y con answers.txt")
child.sendline('''
@@ -312,8 +323,8 @@ RebootOnCompletion=No
if i != 0:
raise Exception("dcpromo failed")
child.sendline("shutdown -r -t 0")
- t.port_wait("${WIN_HOSTNAME}", 23, wait_for_fail=True)
- t.port_wait("${WIN_HOSTNAME}", 23)
+ t.port_wait("${WIN_HOSTNAME}", 139, wait_for_fail=True)
+ t.port_wait("${WIN_HOSTNAME}", 139)
@@ -321,11 +332,10 @@ def test_dcpromo_rodc(t, vm):
t.setwinvars(vm)
t.info("Checking the w2k8 RODC join is OK")
t.chdir('${PREFIX}')
- t.port_wait("${WIN_HOSTNAME}", 445)
+ t.port_wait("${WIN_HOSTNAME}", 139)
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"])
- t.port_wait("${WIN_HOSTNAME}", 23)
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")
@@ -336,7 +346,7 @@ def test_dcpromo_rodc(t, vm):
child.expect("was successful")
child.expect("CN=Configuration,${BASEDN}")
child.expect("was successful")
- child.expect("CN=Schema,CN=Configuration,${BASEDN}")
+ child.expect("CN=Configuration,${BASEDN}")
child.expect("was successful")
t.info("Checking if new users are available on windows")
@@ -369,7 +379,6 @@ def test_join_as_dc(t, vm):
t.chdir('${PREFIX}')
t.retry_cmd('bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}', ["C$", "IPC$", "Sharename"])
t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address'])
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.info("Forcing kcc runs, and replication")
@@ -390,7 +399,7 @@ def test_join_as_dc(t, vm):
child.expect("was successful")
child.expect("CN=Configuration,${WIN_BASEDN}")
child.expect("was successful")
- child.expect("CN=Schema,CN=Configuration,${WIN_BASEDN}")
+ child.expect("CN=Configuration,${WIN_BASEDN}")
child.expect("was successful")
t.info("Checking if new users propogate to windows")
@@ -401,8 +410,8 @@ def test_join_as_dc(t, vm):
t.info("Checking if new users on windows propogate to samba")
child.sendline("net user test3 ${PASSWORD3} /add")
child.expect("The command completed successfully")
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k no", ['Sharename', 'IPC'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'IPC'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k no", ['Sharename', 'IPC'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k yes", ['Sharename', 'IPC'])
t.info("Checking propogation of user deletion")
t.run_cmd('bin/samba-tool user delete test2 -Uadministrator@${WIN_REALM}%${WIN_PASS}')
@@ -410,9 +419,9 @@ def test_join_as_dc(t, vm):
child.expect("The command completed successfully")
t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k no", ['LOGON_FAILURE'])
t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k yes", ['LOGON_FAILURE'])
t.vm_poweroff("${WIN_VM}")
@@ -437,10 +446,10 @@ def test_join_as_rodc(t, vm):
t.chdir('${PREFIX}')
t.retry_cmd('bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}', ["C$", "IPC$", "Sharename"])
t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address'])
- t.port_wait("${WIN_HOSTNAME}", 23)
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.info("Forcing kcc runs, and replication")
+ t.run_cmd('bin/samba-tool drs kcc ${HOSTNAME} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
t.kinit("administrator@${WIN_REALM}", "${WIN_PASS}")
@@ -452,33 +461,36 @@ def test_join_as_rodc(t, vm):
t.info("Checking if showrepl is happy")
child.sendline("repadmin /showrepl")
- child.expect("${WIN_BASEDN}")
- child.expect("was successful")
- child.expect("CN=Configuration,${WIN_BASEDN}")
- child.expect("was successful")
- child.expect("CN=Schema,CN=Configuration,${WIN_BASEDN}")
- child.expect("was successful")
+ child.expect("DSA invocationID")
+
+ t.cmd_contains("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -k yes",
+ [ "INBOUND NEIGHBORS",
+ "OUTBOUND NEIGHBORS",
+ "${WIN_BASEDN}",
+ "Last attempt .* was successful",
+ "CN=Configuration,${WIN_BASEDN}",
+ "Last attempt .* was successful",
+ "CN=Configuration,${WIN_BASEDN}",
+ "Last attempt .* was successful" ],
+ ordered=True,
+ regex=True)
t.info("Checking if new users on windows propogate to samba")
child.sendline("net user test3 ${PASSWORD3} /add")
child.expect("The command completed successfully")
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k no", ['Sharename', 'IPC'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'IPC'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k no", ['Sharename', 'IPC'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k yes", ['Sharename', 'IPC'])
+ # should this work?
t.info("Checking if new users propogate to windows")
- t.run_cmd('bin/samba-tool newuser test2 ${PASSWORD2}')
- t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
- t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
+ t.cmd_contains('bin/samba-tool newuser test2 ${PASSWORD2}', ['No RID Set DN'])
t.info("Checking propogation of user deletion")
- t.run_cmd('bin/samba-tool user delete test2 -Uadministrator@${WIN_REALM}%${WIN_PASS}')
child.sendline("net user test3 /del")
child.expect("The command completed successfully")
- t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
- t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
- t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k no", ['LOGON_FAILURE'])
+ t.retry_cmd("bin/smbclient -L ${HOSTNAME} -Utest3%${PASSWORD3} -k yes", ['LOGON_FAILURE'])
t.vm_poweroff("${WIN_VM}")
@@ -487,8 +499,12 @@ def test_howto(t):
check_prerequesites(t)
+ # we don't need fsync safety in these tests
+ t.putenv('TDB_NO_FSYNC', '1')
+
if not t.skip("build"):
build_s4(t)
+
if not t.skip("provision"):
provision_s4(t)
@@ -508,49 +524,63 @@ def test_howto(t):
if not t.skip("dyndns"):
test_dyndns(t)
- if not t.skip("windows7"):
+ if t.have_var('WINDOWS7_VM') and not t.skip("windows7"):
run_winjoin(t, "WINDOWS7")
test_winjoin(t, "WINDOWS7")
- if not t.skip("winxp"):
+ if t.have_var('WINXP_VM') and not t.skip("winxp"):
run_winjoin(t, "WINXP")
test_winjoin(t, "WINXP")
- if not t.skip("dcpromo_rodc"):
+ if t.have_var('W2K8R2C_VM') and not t.skip("dcpromo_rodc"):
t.info("Testing w2k8r2 RODC dcpromo")
- run_dcpromo_rodc(t, "WINDOWS_DC2")
- test_dcpromo_rodc(t, "WINDOWS_DC2")
+ run_dcpromo_rodc(t, "W2K8R2C")
+ test_dcpromo_rodc(t, "W2K8R2C")
- if not t.skip("dcpromo_w2k8r2"):
+ if t.have_var('W2K8R2B_VM') and not t.skip("dcpromo_w2k8r2"):
t.info("Testing w2k8r2 dcpromo")
- run_dcpromo(t, "WINDOWS_DC1")
- test_dcpromo(t, "WINDOWS_DC1")
+ run_dcpromo(t, "W2K8R2B")
+ test_dcpromo(t, "W2K8R2B")
- if not t.skip("dcpromo_w2k8"):
+ if t.have_var('W2K8B_VM') and not t.skip("dcpromo_w2k8"):
t.info("Testing w2k8 dcpromo")
- run_dcpromo(t, "WINDOWS_DC5")
- test_dcpromo(t, "WINDOWS_DC5")
+ run_dcpromo(t, "W2K8B")
+ test_dcpromo(t, "W2K8B")
+
+ if t.have_var('W2K3B_VM') and not t.skip("dcpromo_w2k3"):
+ t.info("Testing w2k3 dcpromo")
+ t.info("Changing to 2003 functional level")
+ provision_s4(t, func_level='2003', interfaces='${INTERFACES}')
+ create_shares(t)
+ start_s4(t, interfaces='${INTERFACES}')
+ test_smbclient(t)
+ restart_bind(t)
+ test_dns(t)
+ test_kerberos(t)
+ test_dyndns(t)
+ run_dcpromo(t, "W2K3B")
+ test_dcpromo(t, "W2K3B")
- if not t.skip("join_w2k8r2"):
- join_as_dc(t, "WINDOWS_DC3")
+ if t.have_var('W2K8R2A_VM') and not t.skip("join_w2k8r2"):
+ join_as_dc(t, "W2K8R2A")
create_shares(t)
start_s4(t, interfaces='${INTERFACES}')
test_dyndns(t)
- test_join_as_dc(t, "WINDOWS_DC3")
+ test_join_as_dc(t, "W2K8R2A")
- if not t.skip("join_rodc"):
- join_as_rodc(t, "WINDOWS_DC3")
+ if t.have_var('W2K8R2A_VM') and not t.skip("join_rodc"):
+ join_as_rodc(t, "W2K8R2A")
create_shares(t)
start_s4(t, interfaces='${INTERFACES}')
test_dyndns(t)
- test_join_as_rodc(t, "WINDOWS_DC3")
+ test_join_as_rodc(t, "W2K8R2A")
- if not t.skip("join_w2k3"):
- join_as_dc(t, "WINDOWS_DC4")
+ if t.have_var('W2K3A_VM') and not t.skip("join_w2k3"):
+ join_as_dc(t, "W2K3A")
create_shares(t)
start_s4(t, interfaces='${INTERFACES}')
test_dyndns(t)
- test_join_as_dc(t, "WINDOWS_DC4")
+ test_join_as_dc(t, "W2K3A")
t.info("Howto test: All OK")
@@ -560,6 +590,8 @@ if __name__ == '__main__':
parser.add_option("--conf", type='string', default='', help='config file')
parser.add_option("--skip", type='string', default='', help='list of steps to skip (comma separated)')
parser.add_option("--list", action='store_true', default=False, help='list the available steps')
+ parser.add_option("--rebase", action='store_true', default=False, help='do a git pull --rebase')
+ parser.add_option("--clean", action='store_true', default=False, help='clean the tree')
opts, args = parser.parse_args()
@@ -572,5 +604,15 @@ if __name__ == '__main__':
t.set_skip(opts.skip)
if opts.list:
t.list_steps_mode()
- test_howto(t)
+ if opts.rebase:
+ t.info('rebasing')
+ t.chdir('${SOURCETREE}')
+ t.run_cmd('git pull --rebase')
+
+ if opts.clean:
+ t.info('rebasing')
+ t.chdir('${SOURCETREE}/source4')
+ t.run_cmd('rm -rf bin')
+
+ test_howto(t)
diff --git a/source4/scripting/devel/wintest/tridge.conf b/source4/scripting/devel/wintest/tridge.conf
index 17045f6..1288526 100644
--- a/source4/scripting/devel/wintest/tridge.conf
+++ b/source4/scripting/devel/wintest/tridge.conf
@@ -43,39 +43,44 @@ WINXP_SNAPSHOT : howto-test
WINXP_USER : tridge
--
Samba Shared Repository
More information about the samba-cvs
mailing list