Obtaining all members of a group

jose-pr

Dabbler
Joined
Apr 3, 2022
Messages
10
I am trying to run a simple python script to enumerate all users of a group (domain group). This works fine for me on rocky/redhat but when I try it from truenas gr_mem is always an empty list.
Code:
import grp
grp.getgrnam('media-adms')
# Result is
# grp.struct_group(gr_name='media-adms', gr_passwd='x', gr_gid=***, gr_mem=[])


Is there anything i can setup in Truenas so that it returns all members?
 

jose-pr

Dabbler
Joined
Apr 3, 2022
Messages
10
Found out that adding the following:
winbind expand groups = 10
to /etc/smb4.conf made it work. But I see no option to specify additional smb.conf entries through the gui, so not a permanent solution.
 
Top