Linux User Management:/etc/group file details

Source: Internet
Author: User
Both the Linux/etc/group file and the/etc/passwd and/etc/shadow files contain files related to the system administrator's management of users and user groups. The linux/etc/group file is a file on which the system administrator manages users and user groups.

A user Group is a collection of users with some common features ). The user Group configuration files include/etc/group and/etc/gshadow./etc/gshadow is the encrypted information file of/etc/group.

Grouping users is a way to manage users and control access permissions in Linux. Each user belongs to a user group. a group can contain multiple users, and a 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, that is, the default group to which the user belongs during logon, other groups are called additional groups.

All user group information 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: Group user list

Explanation:

Group name:

The group name is the name of the user group, which consists of letters or numbers. Same as the login name in/etc/passwd, the group name should not be repeated.

Password:

The password field stores the encrypted password of the user group. Generally, users in Linux do not have a password, that is, this field is generally blank, or *.

Group ID:

The group ID is similar to the user id. it is also an integer used internally to identify the group. GID.

Group User list:

Is a list of all users in this group. different users are separated by commas. This user group may be the user's primary group or an additional group.

 

Instance used:

Output:

Copy codeThe 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

Related Article

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.