From a9baabed562fb6858bd82ee7312faa908283dde4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 11 Nov 2010 19:55:26 +1100 Subject: s4-provision UTF16 encode the password in sam.ldb, not secrets.ldb The password in secrets.ldb is UTF8, while clearTextPassword in sam.ldb is UTF16. This corrects commit bd5039546e520b6d6897a658bc0a358f0511f7c7, which had these the wrong way around. Andrew Bartlett --- source4/scripting/python/samba/provision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 42c0345ea6..420dd14468 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -830,7 +830,7 @@ def secretsdb_setup_dns(secretsdb, setup_path, names, private_dir, "REALM": realm, "DNSDOMAIN": dnsdomain, "DNS_KEYTAB": dns_keytab_path, - "DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')), + "DNSPASS_B64": b64encode(dnspass), "HOSTNAME": names.hostname, "DNSNAME" : '%s.%s' % (names.netbiosname.lower(), names.dnsdomain.lower()) }) @@ -1015,7 +1015,7 @@ def setup_self_join(samdb, names, setup_add_ldif(samdb, setup_path("provision_dns_add.ldif"), { "DNSDOMAIN": names.dnsdomain, "DOMAINDN": names.domaindn, - "DNSPASS_B64": b64encode(dnspass), + "DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')), "HOSTNAME" : names.hostname, "DNSNAME" : '%s.%s' % (names.netbiosname.lower(), names.dnsdomain.lower()) }) -- cgit