LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-10-2003, 02:31 PM   #1
JBDM
LQ Newbie
 
Registered: Apr 2003
Location: Toledo, OH
Posts: 2

Rep: Reputation: 0
Group ID's and Files


I am slightly confused with the use of Groups in Linux. The way I understand it, the group ID in the passwd field is used to assign an account to a particular group. The group file also has a member list. Can an account belong to more than one group?
For instance:
The account john has a group id of 25 in the passwd file
The group file has several groups
X::25:
Y::26:john
Z::27:

Does john belong to group 25 even though his name is not in the member list field?

Does john also belong to group 26, since his account is listed in the member list field?
 
Old 04-10-2003, 02:47 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
The group field in /etc/passwd file is
the users default group, he doesn't need
to be listed in the group file for that one.

He does also (in addition to the group
he's assigned to in passwd) belong to
any group he's a member of in /etc/group.

Clear enough? :)

Cheers,
Tink
 
Old 04-10-2003, 02:50 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
User john belongs to both groups. Group 25 is his main group, 26 is supplemantary. User can belong to many groups (there's a limit, but I don't remember the value).

BTW You can list all groups your user is in by using 'groups' command.
 
  


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
How to generate report with user id's in SARG jomy Linux - Networking 2 01-04-2011 03:05 AM
Get the sum of accounts id's that have the same group Smsem Linux - General 2 12-03-2004 02:54 AM
email-id's in an domain cyrilvictor Linux - General 1 11-03-2004 07:07 AM
group and password files in /etc Raphael M Slackware 2 08-14-2004 11:53 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM


All times are GMT -5. The time now is 09:25 PM.

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