summaryrefslogtreecommitdiffstats
path: root/source4/scripting
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-10 13:26:31 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-11 09:12:25 +0100
commit7c59ecec5078c0ab8587bb322a228419f5a8c978 (patch)
tree844aedf1ba05449a2f1393aef9c30a7218c5322a /source4/scripting
parent0e945697f59b7215d46af0709ac698f7483850df (diff)
downloadsamba-7c59ecec5078c0ab8587bb322a228419f5a8c978.tar.gz
samba-7c59ecec5078c0ab8587bb322a228419f5a8c978.tar.xz
samba-7c59ecec5078c0ab8587bb322a228419f5a8c978.zip
s4:speedtest.py - use "unicodePwd" for setting user's password
It's available on all AD hosts (including Windows 2000) and on all configurations!
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/devel/speedtest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/devel/speedtest.py b/source4/scripting/devel/speedtest.py
index 56e0a87e9df..d5d87afb77b 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)