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 is the concept of linux user group

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the concept of linux user group". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the concept of linux user group".

In linux, user group is a logical set of users with the same characteristics; user group is a means for the system to uniformly manage the same kind of objects, putting the same kind of users into a group to encapsulate into a larger whole, using user groups is beneficial to organize and manage users according to user characteristics.

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is the user group of linux?

Linux is a multi-user and multi-task time-sharing operating system. If you want to use system resources, you must apply for an account from the system administrator, and then enter the system through this account. This account and user is a concept, through the establishment of different attributes of users, on the one hand, can reasonably use and control system resources, on the other hand, it can also help users organize files and provide security protection for user files.

Each user uses a unique user name and user password. When logging in to the system, only if the user name and password are entered correctly, can they enter the system and their own home directory.

A user group is a logical collection of users with the same characteristics, and sometimes we need to give multiple users the same permissions.

For example, to view and modify the permissions of a file, one way is to authorize file access to multiple users respectively. If there are 10 users, it needs to be authorized 10 times. Obviously, this method is not reasonable.

Another way is to set up a group that has permission to view and modify the file, and then put all users who need to access the file into the group, so that all users have the same permissions as the group. This is the user group. Grouping users into groups is a means to manage users and control access rights in the Linux system. By defining user groups, the management work is greatly simplified.

To put it bluntly, a user group is a technical means to uniformly manage the same kind of objects in linux, which puts the same kind of users into a group and encapsulates them into a larger whole.

Just like the same kind of students are encapsulated into a class, the students are the users, and the class is the group; operating on the class is actually the operation on all the students in the class.

1.4 user-group relationship

The corresponding relationships between users and user groups are: one-to-one, one-to-many, many-to-one, and many-to-many. The following figure shows this relationship:

One-to-one: that is, a user can exist in a group or be the only member of a group.

One to many: that is, a user can exist in multiple user groups. Then this user has common permissions for multiple groups.

Many-to-one: multiple users can exist in a group with the same permissions as the group.

Many-to-many: multiple users can exist in multiple groups. In fact, it is the extension of the above three corresponding relations.

1.5 influence of users and groups on linux

Suppose we have so many users now: zwm, sjg, wxh

Assume that zwm and sjg users are group G1, and wxh is group G2

We created a file, file1, with the zwm user

Well, for this file1, there are three kinds of permission settings.

1. User-- > File owner has full permission to read and write to execute 4 2 1 = 7

The user who created the file directly (zwm) has high permissions to the file.

2. Group-- > File owner read with group permission

The group to which this user belongs (G1 group), what is the operation right of the user in the same group as the above user to this file?

3. Others-- > those with 0 except file owner and owner group

Other users (wxh), what permissions do other people have on this file except the above users and groups?

Thank you for your reading, the above is the content of "what is the concept of linux user group". After the study of this article, I believe you have a deeper understanding of what the concept of linux user group is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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