Every day a Linux command (+)--/etc/group file details

Source: Internet
Author: User

Both the Linux/etc/group file and the/etc/passwd and/etc/shadow files have files related to the management of users and user groups by the system administrator. Linux/etc/group files are files that the system administrator manages for users and user groups, and all the information for the Linux user group is stored in the/etc/group file. A user group is a collection of users with a common attribute. The user group profile mainly has/etc/group and/etc/gshadow, where/etc/gshadow is the/etc/group encrypted information file.

Grouping users makes it a means of managing and controlling access to users in a Linux system. Each user belongs to a group of users, a group can have multiple users, and a user can belong to a different group. When a user is a member of more than one group at the same time, the primary group that the user belongs to is recorded in the/etc/passwd file, which is the default group to which the login belongs, and the others are additional groups.

All the information for the user group is stored in the/etc/group file. The format of this file is separated by a colon (:) Number of fields, which are as follows:

Group Name: password: Group identification number: List of users in the group

Specific explanations:

Group Name:

The 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.

Group Identification Number:

The group identification number is similar to the user identification number and is an integer that is used internally by the system to identify the group. Alias Gid.

List of users in the group:

is a list of all users belonging to this group, separated by commas (,) between different users. This user group may be the user's primary group, or it may be an additional group.

Usage examples:

The Root:x:0:root,linuxsir user group root,x is a password segment, which means that no password is set, and GID is another user under the 0,root user group that includes root, Linuxsir, and GID 0.

Every day a Linux command (+)--/etc/group file details

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.