summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-11 19:55:26 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-11 09:55:06 +0000
commita9baabed562fb6858bd82ee7312faa908283dde4 (patch)
treef0246157593bc08a36a26dc3a7cff4bce172a65d
parent78928f5956d1b593e92875fd46a7071a4c979640 (diff)
downloadsamba-a9baabed562fb6858bd82ee7312faa908283dde4.tar.gz
samba-a9baabed562fb6858bd82ee7312faa908283dde4.tar.bz2
samba-a9baabed562fb6858bd82ee7312faa908283dde4.zip
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
-rw-r--r--source4/scripting/python/samba/provision.py4
1 files changed, 2 insertions, 2 deletions
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())
})