E09 Error: sudo: effective uid is not 0, is sudo installed setuid root?

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: