diff options
author | Björn Baumbach <bb@sernet.de> | 2019-12-30 16:27:59 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2020-01-21 14:38:46 +0000 |
commit | 45abb4fd4f42db5e71a6e226f1ed5486f3c257db (patch) | |
tree | 6c70c8cf495f35410252aab2fc72987fd1358588 /python/samba | |
parent | 2baa301237f4a2446667db39369848402af5f9bf (diff) | |
download | samba-45abb4fd4f42db5e71a6e226f1ed5486f3c257db.tar.gz |
python/samdb: adapt search filter for user object type
Use a user search filter which is similar to the filter which is used
by the basic MS Windows group membership management.
The filter filters for objects with the sAMAccountType ATYPE_NORMAL_ACCOUNT.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/samdb.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/samdb.py b/python/samba/samdb.py index 1230cbb93f4..7852373c817 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -255,8 +255,8 @@ pwdLastSet: 0 filter = "" if 'user' in member_types: - filter += ('(&(sAMAccountName=%s)(objectclass=user))' % - ldb.binary_encode(member)) + filter += ('(&(sAMAccountName=%s)(samAccountType=%d))' % + (ldb.binary_encode(member), dsdb.ATYPE_NORMAL_ACCOUNT)) if 'group' in member_types: filter += ('(&(sAMAccountName=%s)(objectclass=group))' % ldb.binary_encode(member)) |