1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-18 00:59:12 +03:00

Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine"

This reverts commit fdd62e9699.

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.
This commit is contained in:
Matthias Dieter Wallnöfer
2009-09-10 00:46:51 +02:00
parent 27beb7fc7e
commit aae07390e2
2 changed files with 9 additions and 70 deletions

View File

@ -161,14 +161,14 @@ pwdLastSet: 0
assert(len(res) == 1)
user_dn = res[0].dn
mod = ldb.Message()
mod.dn = user_dn
setpw = """
dn: %s
changetype: modify
replace: userPassword
userPassword:: %s
""" % (user_dn, base64.b64encode(password))
glue.samdb_set_password(samdb=self, user_dn=str(user_dn),
dom_dn=self.domain_dn(), mod=mod, new_password=password,
user_change=False)
self.modify(mod)
self.modify_ldif(setpw)
if force_password_change_at_next_login:
self.force_password_change_at_next_login(user_dn)