LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 03-14-2006, 06:41 AM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
Command 'groups' doesn't show group membership correctly


# display the groups user 'dovecot' is in
$groups dovecot
dovecot : dovecot mail
# as shown, user 'dovecot' is in group 'dovecot and group 'mail'

# display the group user 'mail' is in
$groups mail
mail : mail
# as shown, user 'mail' is in group 'mail'

# check who are the members of group 'mail' and I should see user 'dovecot' and user 'mail'
$cat /etc/group |grep mail
mail:x:8:dovecot
# however, I only see user 'dovecot' here

Is there a reason why user 'mail' is not shown as a member of group 'mail' in the last command?

Thanks!
 
Old 03-14-2006, 07:16 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
The /etc/group file has the _secondary_ membership assignment.
The _primary_ member group assignment is in the 4th field of /etc/passwd.

if you look at /etc/passwd for the user mail, you will see its belongs to the groupid=8.

cheers
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a command to show the the member(s) of a group? Akhran Linux - Newbie 3 02-13-2006 05:34 AM
Samba/wbinfo doesn't show local groups pauljtester Linux - Networking 1 09-05-2004 08:26 AM
Group membership? KlaymenDK Mandriva 4 06-25-2004 05:10 AM
Supplementary groups ? and group? what is the difference? funnyusa Linux - Newbie 3 06-29-2003 04:16 PM
Group Membership Question rlkiddjr Linux - General 3 06-18-2002 11:26 PM


All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
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