LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   User and Group Admin: How to tell Who is in What group? (http://www.linuxquestions.org/questions/linux-newbie-8/user-and-group-admin-how-to-tell-who-is-in-what-group-382596/)

Akhran 11-12-2005 10:44 PM

User and Group Admin: How to tell Who is in What group?
 
Looking at my /etc/passwd, I have this entry:

nobody:x:65534:65534:nobody:/nonexistent:/bin/sh

As I understand it, the second 65534 is the GID that nobody belongs to. Now, looking at my /etc/group, I have this entry:

nogroup:x:65534:

The entry in /etc/passwd seems to imply that user 'nobody' belongs to the group 'nogroup'. However, if that is so, then shouldn't the entry in /etc/group be:

nogroup:x:65534:nobody ?

In fact for most of the entries in /etc/group, there is no entry for members of the group (i.e. no entries after the last colon).

Please correct me if I'm wrong.

Thanks !

Tinkster 11-12-2005 11:16 PM

Re: User and Group Admin: How to tell Who is in What group?
 
Quote:

Originally posted by Akhran
[B]
nogroup:x:65534:nobody ?

In fact for most of the entries in /etc/group, there is no entry for members of the group (i.e. no entries after the last colon).
Only members whose PRIMARY group-membership isn't
set in /etc/paswd need to be listed in /etc/group. That is,
if nobody was member of a group nobody (with that being
defined as his default group in passwd) and you also wanted
him to be member of nogroup you'd need to make him a
member of that in /etc/group



Cheers,
Tink


All times are GMT -5. The time now is 12:42 AM.