What user groups?
A collection of users with some common characteristics. The user group profile mainly has/etc/group and/etc/gshadow, where/etc/gshadow is the/etc/group encrypted information file.
Note : Although users under the same user group have common characteristics, different users under the same user group do not have the same permissions on files under their own directory. For example, unless a user opens the permissions of a file, other users in the group have the same permissions as a user for this file, and if a user's permissions to this file are set to private, then other users in the same group do not have the same permissions as the user for this file.
Analysis of the group file
This file contains information about the user group, and each piece of information consists of four parts:
1) "Group name" is the name of the user group, consisting of letters or numbers. As with logins in/etc/passwd, group names should not be duplicated.
2) The Password field holds the password word after the user group is encrypted. The user groups in the General Linux system do not have a password, that is, the field is generally empty or *.
3) "Group ID" is similar to the user identification number and is an integer that is used internally by the system to identify the group.
4) "Group user list" is the list of all users belonging to this group/b], separated by commas (,) between different users. This user group may be the user's primary group, or it may be an additional group.
Frequently used commands for users:
- Groups viewing the members of the currently logged on user group
- Groups Dev View the group where the dev user is located and the members within the group
- WHOAMI the name of the currently logged on user
Basic introduction to Linux user groups and users