summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/samdb.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index 98ae6791a5..668c6003d6 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -337,7 +337,7 @@ member: %s
# Sets the password for it
if setpassword:
- self.setpassword("(dn=" + user_dn + ")", password,
+ self.setpassword("(samAccountName=%s)" % username, password,
force_password_change_at_next_login_req)
except:
self.transaction_cancel()
@@ -362,7 +362,6 @@ member: %s
raise Exception('Unable to find user "%s"' % (username or search_filter))
assert(len(res) == 1)
user_dn = res[0].dn
-
setpw = """
dn: %s
changetype: modify