From 7c59ecec5078c0ab8587bb322a228419f5a8c978 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 10 Nov 2010 13:26:31 +0100 Subject: s4:speedtest.py - use "unicodePwd" for setting user's password It's available on all AD hosts (including Windows 2000) and on all configurations! --- source4/scripting/devel/speedtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source4/scripting/devel/speedtest.py b/source4/scripting/devel/speedtest.py index 56e0a87e9d..d5d87afb77 100755 --- a/source4/scripting/devel/speedtest.py +++ b/source4/scripting/devel/speedtest.py @@ -25,6 +25,7 @@ import optparse import sys import time +import base64 from decimal import Decimal sys.path.append("bin/python") @@ -104,7 +105,7 @@ class SpeedTest(samba.tests.TestCase): dn: """ + user_dn + """ sAMAccountName: """ + user_dn.split(",")[0][3:] + """ objectClass: user -userPassword: """ + self.user_pass + """ +unicodePwd:: """ + base64.b64encode(("\"%s\"" % self.user_pass).encode('utf-16-le')) + """ url: www.example.com """ self.ldb_admin.add_ldif(ldif) -- cgit