LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Command 'groups' doesn't show group membership correctly (https://www.linuxquestions.org/questions/debian-26/command-groups-doesnt-show-group-membership-correctly-424691/)

Akhran 03-14-2006 05:41 AM

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!

marozsas 03-14-2006 06:16 AM

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


All times are GMT -5. The time now is 04:27 AM.