Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What do users and user groups represent in linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces in detail what users and user groups represent in linux. The sample code in this article is very detailed and has a certain reference value. Interested friends can refer to it.

Users and user groups are very important in the Linux system. As the super administrator of the system, root should manage the users and user groups in the current operating system well. The reason is simple: if you can't manage users and user groups well, how do you manage the entire server?

Users: people who use the operating system

User group: a group of users with the same system permissions

Home directory: also known as home directory, is the directory that the user enters by default after logging in to the system, and the user's home directory permissions belong to the user.

Related profile

/ etc/group stores all user group information in the current system.

Each line of the file content represents a user group, and the information format of each user group is fixed, as shown in the figure:

1. The root user group number is fixed to 0.

2. Group password placeholders are all replaced by x

3. The group code 1-499 belongs to the number reserved by the system and is generally reserved for the use of software or services installed on the system. The earlier the installed software or service, the smaller the group number assigned, and the unassigned minimum number is generally assigned to the installed software or service.

4. The user group number manually created by the user starts at 500. Generally, the user group number is assigned the smallest number that is greater than or equal to 500 and is not used.

5. An empty list of user names in the group means that there may be no user or only one user and the user name is the same as the group name

/ etc/gshadow stores password information for user groups in the current system.

The number of lines of the gshadow configuration file is the same as that of the group file, and each line corresponds to each line of group. The description of each line is as follows:

1. If the group password is empty or exclamation point or *, the group does not have a password.

2. The group manager is empty, indicating that every member of the group can manage the group.

/ etc/passwd stores information for all users in the current system.

Each line of the file content represents the configuration information of a user, and each user information is in a fixed format, as shown in the figure:

1. The root user number is fixed to 0.

2. For users other than root users, when the user is created, a directory with the same user name will be created under the / home directory as the user's home directory.

/ etc/shadow stores password information for all users in the current system.

The number of lines of the shadow configuration file is the same as that of the passwd file, and each line corresponds to each line of passwd. The description of each line is as follows:

1. The user password is generally encrypted by an one-way encryption algorithm, so it is impossible to directly see what the original password is.

2, in addition to the user name and password, the content also includes the creation time of the user, the time when the user information was last modified, and so on, there is no need to delve into.

So much for sharing what users and user groups express in linux. I hope the above content can be of some reference value and can be put into practice. If you like this article, you might as well share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report