From aae07390e2b84d8b1d41eb65d31f9621a22a17aa Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 10 Sep 2009 00:46:51 +0200 Subject: Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine" This reverts commit fdd62e9699b181a140292689fcd88a559bc26211. abartlet and I agreed that this isn't the right way to enforce the password policies. Sooner or later we've to control them anyway on the directory level. --- source4/scripting/python/samba/samdb.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/scripting/python/samba') diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 3f4252b36a..a58d6c5b12 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -161,14 +161,14 @@ pwdLastSet: 0 assert(len(res) == 1) user_dn = res[0].dn - mod = ldb.Message() - mod.dn = user_dn - - glue.samdb_set_password(samdb=self, user_dn=str(user_dn), - dom_dn=self.domain_dn(), mod=mod, new_password=password, - user_change=False) + setpw = """ +dn: %s +changetype: modify +replace: userPassword +userPassword:: %s +""" % (user_dn, base64.b64encode(password)) - self.modify(mod) + self.modify_ldif(setpw) if force_password_change_at_next_login: self.force_password_change_at_next_login(user_dn) -- cgit