View all users and all user groups in linux

Source: Internet
Author: User


Groups: view the group member groups gliethttp of the currently logged-on user to view the group of the gliethttp user, view the current username/etc/group in the whoami group. The file contains all usernames in the/etc/shadow and/etc/passwd systems. 1./etc/group explanation; 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, the content of www.2cto.com 2 and/etc/group is analyzed in detail. The content of/etc/group includes the User Group, User group password, GID, and User contained in the User group ), one record for each user group; format: group_name: passwd: GID: user_list each record in/etc/group is divided into four fields : Field 1: User Group name; Field 2: user group password; Field 3: GID field 4: User List, separated by a comma (,); this field can be blank; if the field is blank, the user group is the GID user name. Author: DouglasLau

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.