Changeset 988 for vendor/current/wintest/test-s4-howto.py
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/wintest/test-s4-howto.py
r740 r988 26 26 t.del_files(["var", "private"]) 27 27 t.run_cmd("rm -f etc/smb.conf") 28 provision=['sbin/provision', 28 provision=['bin/samba-tool', 29 'domain', 30 'provision', 29 31 '--realm=${LCREALM}', 30 32 '--domain=${DOMAIN}', … … 36 38 '--host-ip=${INTERFACE_IP}', 37 39 '--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 39 46 if t.getvar('INTERFACE_IPV6'): 40 47 provision.append('--host-ip6=${INTERFACE_IPV6}') 41 48 t.run_cmd(provision) 42 t.run_cmd('bin/samba-tool newusertestallowed ${PASSWORD1}')43 t.run_cmd('bin/samba-tool newusertestdenied ${PASSWORD1}')49 t.run_cmd('bin/samba-tool user add testallowed ${PASSWORD1}') 50 t.run_cmd('bin/samba-tool user add testdenied ${PASSWORD1}') 44 51 t.run_cmd('bin/samba-tool group addmembers "Allowed RODC Password Replication Group" testallowed') 45 52 … … 51 58 t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False) 52 59 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']) 54 61 t.port_wait("${INTERFACE_IP}", 139) 55 62 … … 57 64 '''test smbclient against localhost''' 58 65 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)) 63 71 child.expect("smb:") 64 72 child.sendline("dir") … … 112 120 t.chdir('${PREFIX}') 113 121 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") 115 124 116 125 … … 123 132 def test_winjoin(t, vm): 124 133 t.info("Checking the windows join is OK") 134 smbclient = t.getvar("smbclient") 125 135 t.chdir('${PREFIX}') 126 136 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) 128 138 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"]) 132 142 child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}") 133 143 child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test") … … 165 175 child.expect("C:") 166 176 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) 168 178 if i == 1 or i == 2: 169 179 child.sendline("echo off") … … 179 189 '''test that dcpromo worked''' 180 190 t.info("Checking the dcpromo join is OK") 191 smbclient = t.getvar("smbclient") 181 192 t.chdir('${PREFIX}') 182 193 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}", 184 195 ['${WIN_HOSTNAME}.${LCREALM} has address'], 185 196 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"]) 187 198 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"]) 189 200 190 201 t.cmd_contains("bin/samba-tool drs kcc ${HOSTNAME}.${LCREALM} -Uadministrator@${LCREALM}%${PASSWORD1}", ['Consistency check', 'successful']) … … 260 271 261 272 t.info("Checking if new users propogate to windows") 262 t.retry_cmd('bin/samba-tool newusertest2 ${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']) 265 276 266 277 t.info("Checking if new users on windows propogate to samba") … … 273 284 time.sleep(2) 274 285 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']) 277 288 278 289 t.info("Checking propogation of user deletion") … … 281 292 child.expect("The command completed successfully") 282 293 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']) 287 298 t.vm_poweroff("${WIN_VM}") 288 299 … … 339 350 '''test the RODC dcpromo worked''' 340 351 t.info("Checking the w2k8 RODC join is OK") 352 smbclient = t.getvar("smbclient") 341 353 t.chdir('${PREFIX}') 342 354 t.port_wait("${WIN_IP}", 139) 343 355 child = t.open_telnet("${WIN_HOSTNAME}", "${DOMAIN}\\administrator", "${PASSWORD1}", set_time=True) 344 356 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"]) 346 358 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"]) 348 360 child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test") 349 361 child.expect("The command completed successfully") … … 374 386 375 387 t.info("Checking if new users are available on windows") 376 t.run_cmd('bin/samba-tool newusertest2 ${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']) 378 390 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']) 380 392 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']) 383 395 t.vm_poweroff("${WIN_VM}") 384 396 … … 386 398 def prep_join_as_dc(t, vm): 387 399 '''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") 389 401 t.chdir('${PREFIX}') 390 402 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') 392 405 t.run_cmd("rm -rf etc/smb.conf private") 393 406 child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True) … … 397 410 '''join a windows domain as a DC''' 398 411 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") 400 413 t.port_wait("${WIN_IP}", 389) 401 414 t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] ) 402 415 403 416 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}') 405 418 t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}') 406 419 … … 409 422 '''test the join of a windows domain as a DC''' 410 423 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"]) 413 427 t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address']) 414 428 child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True) … … 422 436 t.cmd_contains("bin/samba-tool drs replicate ${HOSTNAME}.${WIN_REALM} ${WIN_HOSTNAME}.${WIN_REALM} %s -k yes" % nc, ["was successful"]) 423 437 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") 424 441 425 442 retries = 10 … … 443 460 444 461 t.info("Checking if new users propogate to windows") 445 t.retry_cmd('bin/samba-tool newusertest2 ${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']) 448 465 449 466 t.info("Checking if new users on windows propogate to samba") 450 467 child.sendline("net user test3 ${PASSWORD3} /add") 451 468 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']) 454 471 455 472 t.info("Checking propogation of user deletion") … … 458 475 child.expect("The command completed successfully") 459 476 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 464 484 t.vm_poweroff("${WIN_VM}") 465 485 … … 468 488 '''join a windows domain as a RODC''' 469 489 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") 471 491 t.port_wait("${WIN_IP}", 389) 472 492 t.retry_cmd("host -t SRV _ldap._tcp.${WIN_REALM} ${WIN_IP}", ['has SRV record'] ) 473 493 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}') 475 495 t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}') 476 496 … … 479 499 '''test a windows domain RODC join''' 480 500 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"]) 483 504 t.cmd_contains("host -t A ${HOSTNAME}.${WIN_REALM}.", ['has address']) 484 505 child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True) … … 521 542 child.sendline("net user test3 ${PASSWORD3} /add") 522 543 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']) 525 546 526 547 # should this work? 527 548 t.info("Checking if new users propogate to windows") 528 t.cmd_contains('bin/samba-tool newusertest2 ${PASSWORD2}', ['No RID Set DN'])549 t.cmd_contains('bin/samba-tool user add test2 ${PASSWORD2}', ['No RID Set DN']) 529 550 530 551 t.info("Checking propogation of user deletion") … … 532 553 child.expect("The command completed successfully") 533 554 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']) 536 557 t.vm_poweroff("${WIN_VM}") 537 558 … … 541 562 542 563 t.setvar("SAMBA_VERSION", "Version 4") 564 t.setvar("smbclient", "bin/smbclient4") 543 565 t.check_prerequesites() 544 566 … … 550 572 if not t.skip("stop_bind"): 551 573 t.stop_bind() 574 552 575 if not t.skip("stop_vms"): 553 576 t.stop_vms() … … 568 591 if not t.skip("smbclient"): 569 592 test_smbclient(t) 593 570 594 if not t.skip("configure_bind2"): 571 595 t.configure_bind(kerberos_support=True, include='${PREFIX}/private/named.conf') 572 596 if not t.skip("start_bind"): 573 597 t.start_bind() 598 574 599 if not t.skip("dns"): 575 600 test_dns(t) … … 658 683 659 684 if t.have_vm('W2K3A') and not t.skip("join_w2k3"): 685 t.start_winvm("W2K3A") 660 686 prep_join_as_dc(t, "W2K3A") 661 687 t.run_dcpromo_as_first_dc("W2K3A", func_level='2003')
Note:
See TracChangeset
for help on using the changeset viewer.