Primary Versus Secondary Groups

One final note on groups is that it is important to understand the difference between the primary and secondary group. A user can only be a member of one primary group. The primary group is the group that any files they create will belong to by default. However, a user can be a member of multiple secondary groups.

The primary group is the one that is listed in the /etc/passwd file along with the user's entry. Any other group that the user is a member of in /etc/group is considered to be a secondary group.

Get Sams Teach Yourself FreeBSD® in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.