[Samba] getting users of a Active Directory group

Oguz Yilmaz oguzyilmazlist at gmail.com
Thu Nov 11 08:32:55 MST 2010


Hi all,

I try to form a file to include AD usernames with their group
memberships. I have no problems with joining and getent and wbinfo
stuff. All are working.

A user may have more then one group membership except "Domain Users" group.

One way is to run "getent group" and grep for the group I try to find
its members. After finding its GID I can search "getent passwd" output
for the users with this GID. However, in some servers "getent passwd"
only show GID for default "Domain Users" group which every user is a
member of.

Another way is to run "getent group". In one of my servers (win2003),
"getent group" output will give users in the form of:
g_group1:*:10263:mr.smith,mrs.smith
Then I can conclude g_group1 has members mr.smith and mrs.smith.

However in another type of server (2008r2), "getent group" does not
list members as fourth field in the output. Also "getent passwd" lists
only "domain users" group GID.

I do want to now What can be the difference with those AD servers? Is
this about organizational hirarchy of AD?

Can you propose any other way to find members of a specific group?

Samba is samba3-3.5.1-43.el5, os is Centos 5 level.

Best Regards,


--
Oguz YILMAZ


More information about the samba mailing list