Re: Getting the list of members in a group.
- From: Lew Pitcher <lpitcher@xxxxxxxxxxxx>
- Date: Wed, 20 Jun 2007 06:06:16 -0700
On Jun 20, 8:21 am, Davide Bianchi <davideyeahs...@xxxxxxxxxxxxxx>
wrote:
On 2007-06-20, Lew Pitcher <lpitc...@xxxxxxxxxxxx> wrote:
On Jun 20, 6:59 am, voipfc <voi...@xxxxxxxxxxxxxx> wrote:
The simplest way would be to
cat /etc/group
and look at the fourth field
All those have a problem: they don't give you all the members for a
group.
If I do this on my system:
# id
uid=1000(davide) gid=100(users)
groups=100(users),11(floppy),17(audio),18(video),19(cdrom)
# grep users /etc/group
users::100:
So I'm member of the group 'users' but I do not appear in the group file
associated to that group.
Actually, your results reflect a (common) problem with setup. It
appears that the "primary group" value from the various users recorded
in your /etc/password have not been carried over to your /etc/group
file.
If you are in this situation, then the process of obtaining a complete
listing for a group becomes a bit more complex. I don't think that
there is a specific tool that will answer your question in this case,
but a shell script could be crafted to do what you want.
.
- Follow-Ups:
- Re: Getting the list of members in a group.
- From: Chris Cox
- Re: Getting the list of members in a group.
- References:
- Getting the list of members in a group.
- From: voipfc
- Re: Getting the list of members in a group.
- From: Lew Pitcher
- Getting the list of members in a group.
- Prev by Date: Re: Getting the list of members in a group.
- Next by Date: Re: Can't get dual-boot to work, always goes to Vista
- Previous by thread: Re: Getting the list of members in a group.
- Next by thread: Re: Getting the list of members in a group.
- Index(es):
Relevant Pages
|