① The security minimization principle of Linux optimization: the general user's authorization permission is minimized, that is, only necessary management system commands are provided. Therefore, the general user Enn cannot create files here: similarly, you cannot execute administrator commands such as useradd to create a new common user: the permissions of common users are actually minimized. you can only view files and even rm-f (directly force delete files) none: & n
① Knowledge from the principle of minimal security for Linux optimization: Grant the minimum permissions to common users, that is, Grant only necessary management system commands.
Therefore, the normal user Enn cannot create files:
Similarly, you cannot run the administrator command, such as useradd, to create a common user:
In fact, the permissions of common users are minimized. they can only view files and cannot even execute rm-f (directly force delete files:
② Grant more permissions to the general user Enn:
Revoke do (precise user authorization)
Grant all permissions to the normal user Enn:
With the sudo command, Enn, a common user with all permissions, can successfully use the useradd command to create a new common user You:
Ps: a vivid picture of the difference between su and sudo is appended: