Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/wintest/test-s4-howto.py

    r740 r988  
    2626    t.del_files(["var", "private"])
    2727    t.run_cmd("rm -f etc/smb.conf")
    28     provision=['sbin/provision',
     28    provision=['bin/samba-tool',
     29               'domain',
     30               'provision',
    2931               '--realm=${LCREALM}',
    3032               '--domain=${DOMAIN}',
     
    3638               '--host-ip=${INTERFACE_IP}',
    3739               '--option=bind interfaces only=yes',
    38                '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf']
     40               '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
     41               '--dns-backend=${NAMESERVER_BACKEND}',
     42               '${DNS_FORWARDER}']
     43    if t.getvar('USE_NTVFS'):
     44        provision.append('${USE_NTVFS}')
     45
    3946    if t.getvar('INTERFACE_IPV6'):
    4047        provision.append('--host-ip6=${INTERFACE_IPV6}')
    4148    t.run_cmd(provision)
    42     t.run_cmd('bin/samba-tool newuser testallowed ${PASSWORD1}')
    43     t.run_cmd('bin/samba-tool newuser testdenied ${PASSWORD1}')
     49    t.run_cmd('bin/samba-tool user add testallowed ${PASSWORD1}')
     50    t.run_cmd('bin/samba-tool user add testdenied ${PASSWORD1}')
    4451    t.run_cmd('bin/samba-tool group addmembers "Allowed RODC Password Replication Group" testallowed')
    4552
     
    5158    t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
    5259    t.run_cmd(['sbin/samba',
    53              '--option', 'panic action=gnome-terminal -e "gdb --pid %PID%"'])
     60             '--option', 'panic action=gnome-terminal -e "gdb --pid %d"', '--option', 'max protocol=nt1'])
    5461    t.port_wait("${INTERFACE_IP}", 139)
    5562
     
    5764    '''test smbclient against localhost'''
    5865    t.info('Testing smbclient')
    59     t.chdir('${PREFIX}')
    60     t.cmd_contains("bin/smbclient --version", ["Version 4.0"])
    61     t.retry_cmd('bin/smbclient -L ${INTERFACE_IP} -U%', ["netlogon", "sysvol", "IPC Service"])
    62     child = t.pexpect_spawn('bin/smbclient //${INTERFACE_IP}/netlogon -Uadministrator%${PASSWORD1}')
     66    smbclient = t.getvar("smbclient")
     67    t.chdir('${PREFIX}')
     68    t.cmd_contains("%s --version" % (smbclient), ["Version 4.1"])
     69    t.retry_cmd('%s -L ${INTERFACE_IP} -U%%' % (smbclient), ["netlogon", "sysvol", "IPC Service"])
     70    child = t.pexpect_spawn('%s //${INTERFACE_IP}/netlogon -Uadministrator%%${PASSWORD1}' % (smbclient))
    6371    child.expect("smb:")
    6472    child.sendline("dir")
     
    112120    t.chdir('${PREFIX}')
    113121    t.run_cmd("sbin/samba_dnsupdate --fail-immediately")
    114     t.rndc_cmd("flush")
     122    if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
     123        t.rndc_cmd("flush")
    115124
    116125
     
    123132def test_winjoin(t, vm):
    124133    t.info("Checking the windows join is OK")
     134    smbclient = t.getvar("smbclient")
    125135    t.chdir('${PREFIX}')
    126136    t.port_wait("${WIN_IP}", 139)
    127     t.retry_cmd('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"], retries=100)
     137    t.retry_cmd('%s -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"], retries=100)
    128138    t.cmd_contains("host -t A ${WIN_HOSTNAME}.${LCREALM}.", ['has address'])
    129     t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
    130     t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -k no -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
    131     t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -k yes -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
     139    t.cmd_contains('%s -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
     140    t.cmd_contains('%s -L ${WIN_HOSTNAME}.${LCREALM} -k no -Utestallowed@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
     141    t.cmd_contains('%s -L ${WIN_HOSTNAME}.${LCREALM} -k yes -Utestallowed@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
    132142    child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}")
    133143    child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
     
    165175    child.expect("C:")
    166176    child.sendline("dcpromo /answer:answers.txt")
    167     i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=120)
     177    i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=240)
    168178    if i == 1 or i == 2:
    169179        child.sendline("echo off")
     
    179189    '''test that dcpromo worked'''
    180190    t.info("Checking the dcpromo join is OK")
     191    smbclient = t.getvar("smbclient")
    181192    t.chdir('${PREFIX}')
    182193    t.port_wait("${WIN_IP}", 139)
    183     t.retry_cmd("host -t A ${WIN_HOSTNAME}.${LCREALM}. ${INTERFACE_IP}",
     194    t.retry_cmd("host -t A ${WIN_HOSTNAME}.${LCREALM}. ${NAMED_INTERFACE_IP}",
    184195                ['${WIN_HOSTNAME}.${LCREALM} has address'],
    185196                retries=30, delay=10, casefold=True)
    186     t.retry_cmd('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
     197    t.retry_cmd('%s -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
    187198    t.cmd_contains("host -t A ${WIN_HOSTNAME}.${LCREALM}.", ['has address'])
    188     t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
     199    t.cmd_contains('%s -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
    189200
    190201    t.cmd_contains("bin/samba-tool drs kcc ${HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}", ['Consistency check', 'successful'])
     
    260271
    261272    t.info("Checking if new users propogate to windows")
    262     t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
    263     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
    264     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
     273    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     274    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['Sharename', 'Remote IPC'])
     275    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['Sharename', 'Remote IPC'])
    265276
    266277    t.info("Checking if new users on windows propogate to samba")
     
    273284        time.sleep(2)
    274285
    275     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${LCREALM} -Utest3%${PASSWORD3} -k no", ['Sharename', 'IPC'])
    276     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${LCREALM} -Utest3%${PASSWORD3} -k yes", ['Sharename', 'IPC'])
     286    t.retry_cmd("%s -L ${HOSTNAME}.${LCREALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['Sharename', 'IPC'])
     287    t.retry_cmd("%s -L ${HOSTNAME}.${LCREALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['Sharename', 'IPC'])
    277288
    278289    t.info("Checking propogation of user deletion")
     
    281292    child.expect("The command completed successfully")
    282293
    283     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
    284     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${LCREALM} -Utest3%${PASSWORD3} -k no", ['LOGON_FAILURE'])
    285     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
    286     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${LCREALM} -Utest3%${PASSWORD3} -k yes", ['LOGON_FAILURE'])
     294    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['LOGON_FAILURE'])
     295    t.retry_cmd("%s -L ${HOSTNAME}.${LCREALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['LOGON_FAILURE'])
     296    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['LOGON_FAILURE'])
     297    t.retry_cmd("%s -L ${HOSTNAME}.${LCREALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['LOGON_FAILURE'])
    287298    t.vm_poweroff("${WIN_VM}")
    288299
     
    339350    '''test the RODC dcpromo worked'''
    340351    t.info("Checking the w2k8 RODC join is OK")
     352    smbclient = t.getvar("smbclient")
    341353    t.chdir('${PREFIX}')
    342354    t.port_wait("${WIN_IP}", 139)
    343355    child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}", set_time=True)
    344356    child.sendline("ipconfig /registerdns")
    345     t.retry_cmd('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
     357    t.retry_cmd('%s -L ${WIN_HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
    346358    t.cmd_contains("host -t A ${WIN_HOSTNAME}.${LCREALM}.", ['has address'])
    347     t.cmd_contains('bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%${PASSWORD1}', ["C$", "IPC$", "Sharename"])
     359    t.cmd_contains('%s -L ${WIN_HOSTNAME}.${LCREALM} -Utestallowed@${LCREALM}%%${PASSWORD1}' % (smbclient), ["C$", "IPC$", "Sharename"])
    348360    child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
    349361    child.expect("The command completed successfully")
     
    374386
    375387    t.info("Checking if new users are available on windows")
    376     t.run_cmd('bin/samba-tool newuser test2 ${PASSWORD2}')
    377     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
     388    t.run_cmd('bin/samba-tool user add test2 ${PASSWORD2}')
     389    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['Sharename', 'Remote IPC'])
    378390    t.retry_cmd("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} ${BASEDN}", ["was successful"])
    379     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
     391    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['Sharename', 'Remote IPC'])
    380392    t.run_cmd('bin/samba-tool user delete test2 -Uadministrator@${LCREALM}%${PASSWORD1}')
    381     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
    382     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
     393    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['LOGON_FAILURE'])
     394    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['LOGON_FAILURE'])
    383395    t.vm_poweroff("${WIN_VM}")
    384396
     
    386398def prep_join_as_dc(t, vm):
    387399    '''start VM and shutdown Samba in preperation to join a windows domain as a DC'''
    388     t.info("Starting VMs for joining ${WIN_VM} as a second DC using samba-tool join DC")
     400    t.info("Starting VMs for joining ${WIN_VM} as a second DC using samba-tool domain join DC")
    389401    t.chdir('${PREFIX}')
    390402    t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
    391     t.rndc_cmd('flush')
     403    if not t.getvar('NAMESERVER_BACKEND') == 'SAMBA_INTERNAL':
     404        t.rndc_cmd('flush')
    392405    t.run_cmd("rm -rf etc/smb.conf private")
    393406    child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
     
    397410    '''join a windows domain as a DC'''
    398411    t.setwinvars(vm)
    399     t.info("Joining ${WIN_VM} as a second DC using samba-tool join DC")
     412    t.info("Joining ${WIN_VM} as a second DC using samba-tool domain join DC")
    400413    t.port_wait("${WIN_IP}", 389)
    401414    t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] )
    402415
    403416    t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
    404     t.run_cmd('bin/samba-tool join ${WIN_REALM} DC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
     417    t.run_cmd('bin/samba-tool domain join ${WIN_REALM} DC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
    405418    t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
    406419
     
    409422    '''test the join of a windows domain as a DC'''
    410423    t.info("Checking the DC join is OK")
    411     t.chdir('${PREFIX}')
    412     t.retry_cmd('bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}', ["C$", "IPC$", "Sharename"])
     424    smbclient = t.getvar("smbclient")
     425    t.chdir('${PREFIX}')
     426    t.retry_cmd('%s -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%%${WIN_PASS}' % (smbclient), ["C$", "IPC$", "Sharename"])
    413427    t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address'])
    414428    child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
     
    422436        t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${WIN_REALM} ${WIN_HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"])
    423437        t.cmd_contains("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${WIN_REALM} ${HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"])
     438
     439    child.sendline("ipconfig /flushdns")
     440    child.expect("Successfully flushed")
    424441
    425442    retries = 10
     
    443460
    444461    t.info("Checking if new users propogate to windows")
    445     t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
    446     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
    447     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
     462    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     463    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['Sharename', 'Remote IPC'])
     464    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['Sharename', 'Remote IPC'])
    448465
    449466    t.info("Checking if new users on windows propogate to samba")
    450467    child.sendline("net user test3 ${PASSWORD3} /add")
    451468    child.expect("The command completed successfully")
    452     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k no", ['Sharename', 'IPC'])
    453     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k yes", ['Sharename', 'IPC'])
     469    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['Sharename', 'IPC'])
     470    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['Sharename', 'IPC'])
    454471
    455472    t.info("Checking propogation of user deletion")
     
    458475    child.expect("The command completed successfully")
    459476
    460     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k no", ['LOGON_FAILURE'])
    461     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k no", ['LOGON_FAILURE'])
    462     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k yes", ['LOGON_FAILURE'])
    463     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k yes", ['LOGON_FAILURE'])
     477    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%%${PASSWORD2} -k no" % (smbclient), ['LOGON_FAILURE'])
     478    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['LOGON_FAILURE'])
     479    t.retry_cmd("%s -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%%${PASSWORD2} -k yes" % (smbclient), ['LOGON_FAILURE'])
     480    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['LOGON_FAILURE'])
     481
     482    t.run_cmd('bin/samba-tool domain demote -Uadministrator@${WIN_REALM}%${WIN_PASS}')
     483
    464484    t.vm_poweroff("${WIN_VM}")
    465485
     
    468488    '''join a windows domain as a RODC'''
    469489    t.setwinvars(vm)
    470     t.info("Joining ${WIN_VM} as a RODC using samba-tool join DC")
     490    t.info("Joining ${WIN_VM} as a RODC using samba-tool domain join DC")
    471491    t.port_wait("${WIN_IP}", 389)
    472492    t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] )
    473493    t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
    474     t.run_cmd('bin/samba-tool join ${WIN_REALM} RODC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
     494    t.run_cmd('bin/samba-tool domain join ${WIN_REALM} RODC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
    475495    t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
    476496
     
    479499    '''test a windows domain RODC join'''
    480500    t.info("Checking the RODC join is OK")
    481     t.chdir('${PREFIX}')
    482     t.retry_cmd('bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}', ["C$", "IPC$", "Sharename"])
     501    smbclient = t.getvar("smbclient")
     502    t.chdir('${PREFIX}')
     503    t.retry_cmd('%s -L ${HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%%${WIN_PASS}' % (smbclient), ["C$", "IPC$", "Sharename"])
    483504    t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address'])
    484505    child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
     
    521542    child.sendline("net user test3 ${PASSWORD3} /add")
    522543    child.expect("The command completed successfully")
    523     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k no", ['Sharename', 'IPC'])
    524     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k yes", ['Sharename', 'IPC'])
     544    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['Sharename', 'IPC'])
     545    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['Sharename', 'IPC'])
    525546
    526547    # should this work?
    527548    t.info("Checking if new users propogate to windows")
    528     t.cmd_contains('bin/samba-tool newuser test2 ${PASSWORD2}', ['No RID Set DN'])
     549    t.cmd_contains('bin/samba-tool user add test2 ${PASSWORD2}', ['No RID Set DN'])
    529550
    530551    t.info("Checking propogation of user deletion")
     
    532553    child.expect("The command completed successfully")
    533554
    534     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k no", ['LOGON_FAILURE'])
    535     t.retry_cmd("bin/smbclient -L ${HOSTNAME}.${WIN_REALM} -Utest3%${PASSWORD3} -k yes", ['LOGON_FAILURE'])
     555    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k no" % (smbclient), ['LOGON_FAILURE'])
     556    t.retry_cmd("%s -L ${HOSTNAME}.${WIN_REALM} -Utest3%%${PASSWORD3} -k yes" % (smbclient), ['LOGON_FAILURE'])
    536557    t.vm_poweroff("${WIN_VM}")
    537558
     
    541562
    542563    t.setvar("SAMBA_VERSION", "Version 4")
     564    t.setvar("smbclient", "bin/smbclient4")
    543565    t.check_prerequesites()
    544566
     
    550572    if not t.skip("stop_bind"):
    551573        t.stop_bind()
     574
    552575    if not t.skip("stop_vms"):
    553576        t.stop_vms()
     
    568591    if not t.skip("smbclient"):
    569592        test_smbclient(t)
     593
    570594    if not t.skip("configure_bind2"):
    571595        t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf')
    572596    if not t.skip("start_bind"):
    573597        t.start_bind()
     598
    574599    if not t.skip("dns"):
    575600        test_dns(t)
     
    658683
    659684    if t.have_vm('W2K3A') and not t.skip("join_w2k3"):
     685        t.start_winvm("W2K3A")
    660686        prep_join_as_dc(t, "W2K3A")
    661687        t.run_dcpromo_as_first_dc("W2K3A", func_level='2003')
Note: See TracChangeset for help on using the changeset viewer.