LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-08-2006, 01:12 PM   #1
essdeeay
Member
 
Registered: Aug 2004
Location: United Kingdom
Distribution: Gentoo, FC5
Posts: 87

Rep: Reputation: 15
Question How to find out members of groups?


How do I find out the members of a group?

I'm asking because the following shows user valiant$ to have a primary group called machines. But when I look in /etc/group, valiant$ isn't listed as a member of group machines.

Code:
[root@fedora ~]# id valiant$
uid=503(valiant$) gid=505(machines) groups=505(machines)

[root@fedora ~]# grep machines /etc/group
machines:x:505:
Thanks,
Steve
 
Old 04-08-2006, 01:53 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

machines is that users primary group (gid=505(machines)), only the 'extra' groups that is/are assosited with that user are shown in /etc/group.

id includes the primary group when it shows all the groups that user belongs to. In the above example, the user is only associated with one group (its primary group: machines).

/etc/passwd holds the users primary group (id, not the name) and /etc/group holds all the extra groups a user is assosiated with.

Hope this helps.
 
Old 04-08-2006, 01:56 PM   #3
essdeeay
Member
 
Registered: Aug 2004
Location: United Kingdom
Distribution: Gentoo, FC5
Posts: 87

Original Poster
Rep: Reputation: 15
Cool

Thank you very much
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
groups (system default groups) Xavius Linux - General 2 07-18-2012 02:50 AM
Map Windows NT Groups to UNIX Groups - why? kenji1903 Linux - Networking 4 10-16-2007 11:52 AM
limit to nesting groups within groups? geekgrl Linux - General 3 10-16-2007 11:50 AM
winbind: wbinfo -g only lists global groups from PDC and not local groups saradiya Linux - Networking 0 12-01-2003 02:58 AM
Groups members of other groups bentz Linux - Security 6 06-22-2003 11:23 PM


All times are GMT -5. The time now is 09:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration