[Samba] Enum groups of a user Samba 3.0.23

James A. Dinkel jdinkel at bucoks.com
Fri Dec 8 21:28:50 GMT 2006


> -----Original Message-----
> From: Henrik Zagerholm
> Sent: Friday, December 08, 2006 7:32 AM
> 
> Hello list,
> 
> I wonder if I can somehow enumerate all local groups a user is member
> of?
> 
> Regards,
> Henrik

I don't get what you mean.  You should be able to list all groups with
members with:

getent group

If you want to filter out groups for just one user you can do this:

getent group | grep username

But it will still list all the users that are also members of the same
group.  If you are using winbind, you can also try this:

Wbinfo -r username

Which will return just the gids of all the domain groups a user is a
member of, but I don't know if it returns local groups or not.



More information about the samba mailing list