diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-10 00:46:51 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-10 00:48:19 +0200 |
commit | aae07390e2b84d8b1d41eb65d31f9621a22a17aa (patch) | |
tree | c552c19755d303f921c6ebc952898001d0df0251 /source4/scripting/python/samba | |
parent | 27beb7fc7efde5c26917357e6a53e61e4cd7e04a (diff) | |
download | samba-aae07390e2b84d8b1d41eb65d31f9621a22a17aa.tar.gz samba-aae07390e2b84d8b1d41eb65d31f9621a22a17aa.tar.xz samba-aae07390e2b84d8b1d41eb65d31f9621a22a17aa.zip |
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.
Diffstat (limited to 'source4/scripting/python/samba')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 14 |
1 files changed, 7 insertions, 7 deletions
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) |