View all users and all user groups in linux

Source: Internet
Author: User
The content of/etc/group includes the User Group, User group password, GID, and User included in the User Group.

Groups
Groups gliethttp: view the group where the gliethttp user is located and the group members
Whoami

The/etc/group file contains all groups.
All usernames in the/etc/shadow and/etc/passwd systems


1. Explanation of/etc/group;

The/etc/group file is the configuration file of the user group. it contains the user and user group, and shows which user group or user group the user belongs, because a user can belong to one or more different user groups, users in the same user group have similar features. For example, if we add a user to the root user group, this user can browse the files in the root user's home directory. if the root user opens the read and write permissions for a file, all users of the root user group can modify this file. if it is an executable file (such as a script), users of the root user group can also execute it;

User group features provide great convenience for system administrators in system management, but security is also worth noting. for example, a user has the most important content for system management, it is best to allow users to have independent user groups, or set the permissions of files under the user to be completely private. In addition, the root user group should not easily add normal users,

2. detailed analysis of/etc/group content

The content of/etc/group includes the User Group, User group password, GID, and User included in the User Group. each User group has a record. the format is as follows:

Group_name: passwd: GID: user_list

Each record in/etc/group has four fields:

Field 1: User group name;

Field 2: User Group password;

Third Field: GID
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.