t.chdir('${PREFIX}')
t.del_files(["var", "private"])
t.run_cmd("rm -f etc/smb.conf")
- provision=['sbin/provision',
+ provision=['bin/samba-tool',
+ 'domain',
+ 'provision',
'--realm=${LCREALM}',
'--domain=${DOMAIN}',
'--adminpass=${PASSWORD1}',
'--option=interfaces=${INTERFACE}',
'--host-ip=${INTERFACE_IP}',
'--option=bind interfaces only=yes',
- '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf']
+ '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
+ '--dns-backend=${NAMESERVER_BACKEND}',
+ '${DNS_FORWARDER}']
+ if t.getvar('USE_NTVFS'):
+ provision.append('${USE_NTVFS}')
+
if t.getvar('INTERFACE_IPV6'):
provision.append('--host-ip6=${INTERFACE_IPV6}')
t.run_cmd(provision)
t.chdir("${PREFIX}")
t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
t.run_cmd(['sbin/samba',
- '--option', 'panic action=gnome-terminal -e "gdb --pid %d"'])
+ '--option', 'panic action=gnome-terminal -e "gdb --pid %d"', '--option', 'max protocol=nt1'])
t.port_wait("${INTERFACE_IP}", 139)
def test_smbclient(t):
t.info('Testing smbclient')
smbclient = t.getvar("smbclient")
t.chdir('${PREFIX}')
- t.cmd_contains("%s --version" % (smbclient), ["Version 4.0"])
+ t.cmd_contains("%s --version" % (smbclient), ["Version 4.1"])
t.retry_cmd('%s -L ${INTERFACE_IP} -U%%' % (smbclient), ["netlogon", "sysvol", "IPC Service"])
child = t.pexpect_spawn('%s //${INTERFACE_IP}/netlogon -Uadministrator%%${PASSWORD1}' % (smbclient))
child.expect("smb:")
'''test that dynamic DNS is working'''
t.chdir('${PREFIX}')
t.run_cmd("sbin/samba_dnsupdate --fail-immediately")
- t.rndc_cmd("flush")
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ t.rndc_cmd("flush")
def run_winjoin(t, vm):
child.expect("C:")
child.expect("C:")
child.sendline("dcpromo /answer:answers.txt")
- i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=120)
+ i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=240)
if i == 1 or i == 2:
child.sendline("echo off")
child.sendline("echo START DCPROMO log")
smbclient = t.getvar("smbclient")
t.chdir('${PREFIX}')
t.port_wait("${WIN_IP}", 139)
- t.retry_cmd("host -t A ${WIN_HOSTNAME}.${LCREALM}. ${INTERFACE_IP}",
+ t.retry_cmd("host -t A ${WIN_HOSTNAME}.${LCREALM}. ${NAMED_INTERFACE_IP}",
['${WIN_HOSTNAME}.${LCREALM} has address'],
retries=30, delay=10, casefold=True)
t.retry_cmd('%s -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
t.info("Starting VMs for joining ${WIN_VM} as a second DC using samba-tool domain join DC")
t.chdir('${PREFIX}')
t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
- t.rndc_cmd('flush')
+ if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
+ t.rndc_cmd('flush')
t.run_cmd("rm -rf etc/smb.conf private")
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.get_ipconfig(child)
'''test the Samba4 howto'''
t.setvar("SAMBA_VERSION", "Version 4")
- t.setvar("smbclient", "bin/smbclient")
+ t.setvar("smbclient", "bin/smbclient4")
t.check_prerequesites()
# we don't need fsync safety in these tests
t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
if not t.skip("stop_bind"):
t.stop_bind()
+
if not t.skip("stop_vms"):
t.stop_vms()
start_s4(t)
if not t.skip("smbclient"):
test_smbclient(t)
+
if not t.skip("configure_bind2"):
t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
if not t.skip("start_bind"):
t.start_bind()
+
if not t.skip("dns"):
test_dns(t)
if not t.skip("kerberos"):