Skip to content

Commit

Permalink
Fix invalid username on modify_password
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyeuse committed Sep 18, 2024
1 parent 51098fd commit f65a267
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.64
1.0.65
7 changes: 5 additions & 2 deletions ldeep/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,11 @@ def action_modify_password(self, kwargs):
if curr == "None":
curr = None

if self.engine.modify_password(user, curr, new):
info("Password of {username} changed".format(username=user))
try:
if self.engine.modify_password(user, curr, new):
info("Password of {username} changed".format(username=user))
except LdapActiveDirectoryView.ActiveDirectoryLdapException as e:
error(f"{e}, check sAMAccountName")
else:
error(
"Unable to change {username}'s password, check privileges".format(
Expand Down

0 comments on commit f65a267

Please sign in to comment.