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! |
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 01:34 PM. |