1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-18 08:23:51 +03:00

provision: Decrease the length of random machine passwords

The current length of 128-255 UTF-16 characters currently causes
generation of crypt() passwords to typically fail. This commit
decreases the length to 120 UTF-16 characters, which is the same as
that used by Windows.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14621

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton
2021-02-24 02:03:25 +13:00
committed by Andrew Bartlett
parent 88b3d3443b
commit 609ca65765
5 changed files with 5 additions and 5 deletions

View File

@@ -136,7 +136,7 @@ class DCJoinContext(object):
if machinepass is not None:
ctx.acct_pass = machinepass
else:
ctx.acct_pass = samba.generate_random_machine_password(128, 255)
ctx.acct_pass = samba.generate_random_machine_password(120, 120)
ctx.dnsdomain = ctx.samdb.domain_dns_name()