import sys, os
import wintest, pexpect, time, subprocess
+
def set_krb5_conf(t):
t.putenv("KRB5_CONFIG", '${PREFIX}/private/krb5.conf')
+
def build_s4(t):
'''build samba4'''
t.info('Building s4')
'--option', 'panic action=gnome-terminal -e "gdb --pid %d"', '--option', 'max protocol=nt1'])
t.port_wait("${INTERFACE_IP}", 139)
+
def test_smbclient(t):
'''test smbclient against localhost'''
t.info('Testing smbclient')
t.cmd_contains("host -t A ${HOSTNAME}.${LCREALM}",
['${HOSTNAME}.${LCREALM} has address'])
+
def test_kerberos(t):
'''test that kerberos is OK'''
t.info("Testing kerberos")
t.run_winjoin(t, "${LCREALM}")
+
def test_winjoin(t, vm):
t.info("Checking the windows join is OK")
smbclient = t.getvar("smbclient")
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.get_ipconfig(child)
+
def join_as_dc(t, vm):
'''join a windows domain as a DC'''
t.setwinvars(vm)