I can use the following command to get the effective group ID of a process:
ps -o pid,egid
But how can I get the supplementary groups IDs of a process?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The man page has these format specifiers:
supgid SUPGID group ids of supplementary groups, if any. See getgroups(2). supgrp SUPGRP group names of supplementary groups, if any. See getgroups(2).
ps -o supgid etc. Though if you use
supgrp with some other columns, the default width might not fit all groups if there are many, so you may want to widen it, e.g.
ps -o pid,supgrp:100,args