Basic introduction to Linux user groups and users

Source: Internet
Author: User

What user groups?

A collection of users with some common characteristics. The user group profile mainly has/etc/group and/etc/gshadow, where/etc/gshadow is the/etc/group encrypted information file.

Note : Although users under the same user group have common characteristics, different users under the same user group do not have the same permissions on files under their own directory. For example, unless a user opens the permissions of a file, other users in the group have the same permissions as a user for this file, and if a user's permissions to this file are set to private, then other users in the same group do not have the same permissions as the user for this file.

Analysis of the group file

This file contains information about the user group, and each piece of information consists of four parts:

1) "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.
2) The Password field holds the password word after the user group is encrypted. The user groups in the General Linux system do not have a password, that is, the field is generally empty or *.
3) "Group ID" is similar to the user identification number and is an integer that is used internally by the system to identify the group.
4) "Group user list" is the list of all users belonging to this group/b], separated by commas (,) between different users. This user group may be the user's primary group, or it may be an additional group.

Frequently used commands for users:

    • Groups viewing the members of the currently logged on user group
    • Groups Dev View the group where the dev user is located and the members within the group
    • WHOAMI the name of the currently logged on user

Basic introduction to Linux user groups and users

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.