Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 03-14-2006, 05:41 AM   #1
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
# 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?

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

Rep: Reputation: 66
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.



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 04:34 AM
Samba/wbinfo doesn't show local groups pauljtester Linux - Networking 1 09-05-2004 07:26 AM
Group membership? KlaymenDK Mandriva 4 06-25-2004 04:10 AM
Supplementary groups ? and group? what is the difference? funnyusa Linux - Newbie 3 06-29-2003 03:16 PM
Group Membership Question rlkiddjr Linux - General 3 06-18-2002 10:26 PM > Forums > Linux Forums > Linux - Distributions > Debian

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

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