sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Getting the error while running the sudo -s to become root

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

1.Login the server using root and change the permission of /usr/bin/sudo

chmod 4755 /usr/bin/sudo

2. if you do not have root password then reboot the server on single usermode and run these commands.
mount -o remount,rw /dev/mapper/lv_root /
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
restart

Comments

Popular Posts

Install and configure rsyslog Centralized logging server in CentOS

How to fix postfix/smtp Network is unreachable error

Could not join realm: Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli