Solution 1
If you switch the root permissions with normal users: sudo: effective uid is not 0, is sudo installed setuid root
Using LS – L/usr/bin/sudo, you will find that the file will show red, and the owner is root, that is, the user with uid 0. And the execution of the program is set to s (suid), which means that the user executing the program will temporarily obtain the permission of the owner, that is, the root account
the principle is: sudo will check whether the current user’s definition of using a command is defined in/etc/sudoers. For example, if you use: sudo useradd user1, sudo will check whether user1 has the definition of user add permission. If so, it will temporarily upgrade the permissions of user1 to root to perform the useradd operation. Otherwise, the implementation will be refused
Solution:
chown root.root /usr/bin/sudo
CHMOD U + S/usr/bin/sudo
chmod go-w /usr/libexec/sudoers.so
Solution 2
It is mainly applied to a command Yum reinstall ` RPM – QF/usr/bin/sudo`
Similar Posts:
- sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, q…
- Solution of Su command cannot set groups: operation not permitted
- [Solved] su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
- [Solved] Forbid root, handle error sudo must be owned by uid 0
- How to Solve Error: Bad owner or permissions on .ssh/config
- The global installation NPM package reported an error and did not have permission
- ubuntu18.04 Start Android StudioKVM is required to run this AVD ./dev/kvm device: permission denied.
- [Solved] Failed to load VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT)
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- If permissions 0644 for ‘/ root /. SSH / ID appears_ It is OK to reduce the permission to 0600