Now, let's try and clear up some of the confusion about how the password file relates to the group file, and see where primary and secondary groups come into the picture. We'll do this using the example users and groups listed in Table 3.1. This shows that prim_user and sec_user only have a primary group definition, while the user named both_user is also a member of a secondary group as well.
|User Name (UID)||Primary Group (GID)||Secondary Group (GID)|
|prim_user (200)||prim (500)||—|
|sec_user (201)||sec (501)||—|
|both_user (202)||prim (500)||sec (501)|
We've already seen that a user's primary group is defined by that user's entry in /etc/passwd, and that any secondary groups the user is also a member of are defined ...