Re: How To Find Out Which Groups a Unix User Belongs To



Laurent Schneider wrote:

I used to use id to do this. But on one server (Solaris 10 with NIS),
it does not work anymore

$ /usr/ucb/whoami
lschnei2
$ id -a admtlmgm
uid=56745(admtlmgm) gid=56744(tls) groups=56744(tls)
$ ssh admtlmgm@localhost id -a
uid=56745(admtlmgm) gid=56744(tls) groups=56744(tls),70(certs)
$ getent group certs
certs::70:crldf,patrol,tralog

as you, as a non-privileged user, I cannot see the secondary groups of
the user admtlmgm, and I cannot see which users belongs to certs

I just checked on HPUX. It does not report the additional groups for
random users even though on that particualr system is was decided to
make /etc/group word readable.

For me id has always worked as root.
.