mirror of
https://github.com/samba-team/samba.git
synced 2025-07-22 16:59:09 +03:00
s4-samdb: give a better exception if multiple users match in password change
This commit is contained in:
@ -372,7 +372,8 @@ member: %s
|
||||
expression=search_filter, attrs=[])
|
||||
if len(res) == 0:
|
||||
raise Exception('Unable to find user "%s"' % (username or search_filter))
|
||||
assert(len(res) == 1)
|
||||
if len(res) > 1:
|
||||
raise Exception('Matched %u multiple users with filter "%s"' % (len(res), search_filter))
|
||||
user_dn = res[0].dn
|
||||
setpw = """
|
||||
dn: %s
|
||||
|
Reference in New Issue
Block a user