Linux user group management and rights management - theory

1. Linux user group management:

(1) Three types of users of the Linux system:

  • Root user: The root user UID (user identity certificate) is 0, the highest authority, and also a super user.
  • System user: UID ranges from 1 to 999. This type of user does not have the ability to log in to the Linux system, but it is also an essential user for the system to run.
  • Ordinary user: UID is 1000~60000, can log in to the system, and perform common operations, and can operate the contents of their own directory.

(2) The category of the group:

        In Linux, every user must have a primary group. When an account is created, the system automatically creates a group with the same name as the account's primary group. A user must belong to one and only one primary group. A user can belong to zero or more additional groups.

(3) User and group configuration files:

        In Linux, everything is a file, so users and groups are also stored in the system in the form of configuration files. When you log in to the Linux system, although you enter your own user name and password, in fact the Linux system does not recognize these user names, it only recognizes the ID number (that is, a string of numbers) corresponding to the user name. The Linux system stores the configuration information of all users and groups in the following four files.

  • /etc/passwd: user and its attribute information (name, UID, primary group ID, etc.) 

Look at the first line of the /etc/group file, the code is as follows:

[root@localhost ~]# cat /etc/passwd |head

Guess you like

Origin blog.csdn.net/weixin_61275790/article/details/129851712