What is the /etc/group file, and what does the /etc/group file do? In fact, the /etc/group file in the Linux system is mainly used to store the information of the user group. It needs to be managed regularly. The following system home introduces you to the method of managing users through the /etc/group file in Linux. Let's take a look at it. User
have some common features set up as a user group (Group). The user group configuration files mainly include /etc/group and /etc/gshadow, where /etc/gshadow is the encrypted information file of /etc/group.
Grouping users is a means of managing and controlling access to users in a Linux system (see How the System Home restricts access to Linux users). Each user belongs to a user group; there can be multiple users in a group, and one user can belong to different groups. When a user is a member of multiple groups at the same time, the main group to which the user belongs is recorded in the /etc/passwd file, which is the default group to which the login belongs, and the other groups are called additional groups.
All information about the user group is stored in the /etc/group file. The format of this file is separated by a colon (:). The fields are as follows:
Group Name: Password: Group ID: User list in the group
Specific explanation: Br>
Group Name:
The group name is the name of the user group and consists of letters or numbers. As with the login name in /etc/passwd, the group name should not be duplicated.
Password:
The password field stores the encrypted password of the user group. Generally, the user group of the Linux system does not have a password, that is, this field is generally empty or *.
Group ID:
The group ID is similar to the user ID and is an integer that is used internally by the system to identify the group. Nicknamed GID.
Group User List:
is a list of all users belonging to this group, separated by commas (,). This user group may be the user's primary group or an additional group.
Use case:
Output:
The code is as follows:
[root@localhost test6]# cat /etc/group
Root:x:0:root,linuxsir
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys :x:3:root,bin
The above is the way Linux uses the /etc/group file to manage users, because all user information is in this file, if you want to manage users, you can Open the /etc/group file for management.
In the Linux system, the make command is usually used with the Makefile. What are t
after Ubuntu Qt is transplanted to the development board Qt is an object-oriented framework. It can
Crunchbang system is a lightweight Linux desktop distribution. Crunchbang Linux is
Linux is the most horrible problem with git bash. Once garbled, it will affect git
What should I do if the partition reads and writes error after Debian mounts the mobile hard disk?
How to use the command line to access Gmail
Linux screenshot tool scrot operation skills
How to use sed command to replace string under Linux
How to adjust the resolution and screen refresh rate of Ubuntu system?
Linux ln command operation guide
Ubuntu 12.04 install Gnome Shell extension method
Linux how to use the setfacl command to create a permission file
Linux system Rhythmbox player how to solve Chinese garbled?
How to undo operations in Git in Linux
What should I do if the Win8 system has a black screen after updating the patch?
Which is better for win7 and win8 system operation interface?
How to use the Win10 fallback function?
Win10 offers a free upgrade for the first time! 7 big new changes at a glance
Win 8 hard drive no solution for install.wim file
Win7 system prompts "Cannot access the specified device path or file" What to do
How does Win7 ping the internet speed? Ping network method
Win7 title bar label set to display pattern
How to restore touch version IE11
How to solve the loss of BitLocker password in Windows8 system