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

upgradehelpers.py: add a comment to update_krbtgt_account_password()

The backend generates its own random krbtgt password values.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher
2022-02-21 15:23:54 +01:00
parent 725c94d57d
commit ad0b5561b4

View File

@@ -658,9 +658,12 @@ def update_krbtgt_account_password(samdb):
assert(len(res) == 1)
msg = ldb.Message(res[0].dn)
machinepass = samba.generate_random_machine_password(128, 255)
mputf16 = machinepass.encode('utf-16-le')
msg["clearTextPassword"] = ldb.MessageElement(mputf16,
# Note that the machinepass value is ignored
# as the backend (password_hash.c) will generate its
# own random values for the krbtgt keys
krbtgtpass = samba.generate_random_machine_password(128, 255)
kputf16 = krbtgtpass.encode('utf-16-le')
msg["clearTextPassword"] = ldb.MessageElement(kputf16,
ldb.FLAG_MOD_REPLACE,
"clearTextPassword")