mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
s4:speedtest.py - use "unicodePwd" for setting user's password
It's available on all AD hosts (including Windows 2000) and on all configurations!
This commit is contained in:
parent
0e945697f5
commit
7c59ecec50
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user