Bug 14692 - "samba-tool group listmembers --hide-expired" does not list objects without accountExpires attribute
Summary: "samba-tool group listmembers --hide-expired" does not list objects without a...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.14.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Björn Baumbach
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-23 16:16 UTC by Björn Baumbach
Modified: 2021-04-26 18:29 UTC (History)
1 user (show)

See Also:


Attachments
fix for 4.14, cherry-picked from master (4.55 KB, patch)
2021-04-26 15:59 UTC, Björn Baumbach
bbaumbach: review? (rpenny)
bbaumbach: ci-passed+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2021-04-23 16:16:39 UTC
The command
# samba-tool group listmembers my_group --hide-expired
does not list contacts (or other group member objects without the accountExpires attribute).

Have patch, need bug number.
Comment 1 Rowland Penny 2021-04-23 18:47:14 UTC
There is another bug here as well, the search doesn't list members of nested groups either.

Example:

sudo samba-tool group listmembers 'domain admins'
Unix Admins
swanadmin
dhcpduser
Administrator

But using what I believe to be the correct search filter:

sudo ldbsearch -H /var/lib/samba/private/sam.ldb -b 'dc=samdom,dc=example,dc=com' -s sub '(memberOf:1.2.840.113556.1.4.1941:=CN=Domain Admins,CN=Users,DC=samdom,DC=example,DC=com)' sAMAccountName | grep 'sAMAccountName' | sed 's/sAMAccountName: //'
Unix Admins
swanadmin
rowland
dhcpduser
Administrator

It clearly shows that I am a member of Domain Admins via the Unix Admins group.

Shall I wait until you fix your bug and then file another bug, or do you want to fix it at the same time as you fix yours ?
Comment 2 Björn Baumbach 2021-04-26 07:13:25 UTC
(In reply to Rowland Penny from comment #1)
Hi Rowland, I would like to fix these different issues separately.

I've created a merge request:
https://gitlab.com/samba-team/samba/-/merge_requests/1923
Comment 3 Samba QA Contact 2021-04-26 13:22:04 UTC
This bug was referenced in samba master:

86f2b8dab1102974d32275282dfe69f4af5b6834
2e2426e51576aae6211950b25aaacdd97815b111
Comment 4 Björn Baumbach 2021-04-26 15:59:59 UTC
Created attachment 16597 [details]
fix for 4.14, cherry-picked from master