In newuser, a filter by dn was given to setpassword to find the account whose password is to be reset.
It appears however that if given filter of type (dn=CN=smth) Windows fails to return the entry, and the
tests that use newuser fail against it. Changed to use samAccountName instead.
# 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()
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