Article Title: Application of super-level permission control in Linux operating system. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source and other basic categories in Linux operating systems, the root permission is the highest, also known as the super permission owner. Operations that common users cannot perform can be completed by the root user, so they are also called Super management users.
In the system, every file, directory, and process belongs to a user. Other common users cannot operate without user permission, except root users. The root User Privilege is also manifested in the fact that the root user can read, modify, or delete files or directories (within the normal scope of the system) beyond any user or user group ); execute and terminate executable programs, add, create, and remove hardware devices, and modify the owner and permissions of files and directories, to meet the needs of system management (because root is the privileged user with the highest permissions in the system );
1. Understanding of Super Users and common users
1. What is a Super User;
In all Linux systems, UID is used to differentiate user permission levels. Users with UID 0 are deemed to have super permissions. Super Users have the highest permissions agreed by the system to operate in the garden, so super users can complete all the tools for system management; we can check through/etc/passwd that the user with UID 0 is root, and only the UID corresponding to root is 0. From this point of view, root users are irreplaceable in the system and have unlimited permissions. Root users are super users in the system;
2. Understand the correspondence between UID and user
When the system is installed by default, the System user is in a one-to-one relationship with the UID, that is, a UID corresponds to a user. We know that the user identity is identified by UID) in the description of the UID in the configuration file, the UID indicates that "UID is the identifier used to confirm the user permission. The role of the user to log on to the system is implemented by UID instead of the user name; it is dangerous to share a UID among several users. For example, we change the UID of a common user to 0 and share a UID with the root user, which in fact leads to confusion in System Management permissions. If we want to use the root permission, we can implement it through su or sudo. do not share the same UID with the root user ;"
In the system, can the UID and user be in a one-to-many relationship? Yes. For example, we can allocate a UID of 0 to several users, which is the one-to-many relationship between the UID and the user. But this is indeed a little dangerous; users with the same UID have the same identity and permissions. For example, after we change the UID of beinan to 0 in the system, this ordinary user actually has super permissions, and his abilities and permissions are the same as those of the root user; all beinan operations will be marked as root operations, because the UID of beinan is 0, and the user whose UID is 0 is root, is it a bit disturbing? It can also be understood that the user whose UID is 0 is root, and the UID of the root user is 0;
The one-to-one relationship between the UID and the user only requires the Administrator to adhere to the rules for system management, because system security is still the first priority. Therefore, it is the best choice to retain super permissions to the only root user;
If we do not share the UID 0 value with other users, the root user is the only super-authorized user with UID = 0;
[1] [2] Next page