mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
samba-tool:domain: use generate_random_machine_password() for machine passwords
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
b2fac99ac6
commit
f04e09e196
@ -105,7 +105,7 @@ class dc_join(object):
|
||||
if machinepass is not None:
|
||||
ctx.acct_pass = machinepass
|
||||
else:
|
||||
ctx.acct_pass = samba.generate_random_password(32, 40)
|
||||
ctx.acct_pass = samba.generate_random_machine_password(128, 255)
|
||||
|
||||
ctx.dnsdomain = ctx.samdb.domain_dns_name()
|
||||
if clone_only:
|
||||
@ -684,7 +684,7 @@ class dc_join(object):
|
||||
pass
|
||||
ctx.net.set_password(account_name=ctx.samname,
|
||||
domain_name=ctx.domain_name,
|
||||
newpassword=ctx.acct_pass)
|
||||
newpassword=ctx.acct_pass.encode('utf-8'))
|
||||
|
||||
res = ctx.samdb.search(base=ctx.acct_dn, scope=ldb.SCOPE_BASE,
|
||||
attrs=["msDS-KeyVersionNumber"])
|
||||
|
Loading…
Reference in New Issue
Block a user