View all users and all user groups under Linux

Source: Internet
Author: User

Groups Viewing the members of the currently logged on user group
Groups Gliethttp View the group that the Gliethttp user is in, and the members in the group
WhoAmI View the currently logged in user name

/etc/group file contains all groups
All user names exist for/etc/shadow and/etc/passwd systems


1,/etc/group commentary;

The/etc/group file is a user group profile that includes users and user groups, and can show which user group or groups of users belong to, because one user can belong to one or more different groups of users, and users of the same user group have similar characteristics. For example, if we add a user to the root user group, then the user can browse the root user's home directory files, if the root user to open the read and write permissions of a file, all users of the root user group can modify the file, if it is executable files (such as scripts), The user of the root user group can also be executed;

User group's characteristics in system management for the system administrator to provide a great convenience, but security is also worth attention, such as a user under the system management has the most important content, it is best to let users have a separate user group, or the user under the permissions of the file is set to fully private In addition, the root user group is generally not easy to add ordinary users to enter,

2,/etc/group content specific analysis

The content of/etc/group includes user group, user group password, GID, and user group, a record of each user group, in the following format:

group_name:passwd:GID:user_list

each record in/etc/group is divided into four fields:

First field: User group name;

Second field: User group password;

Third field: GID

View all users and all user groups under Linux

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.