You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Note!! Please register for a free account to access the full content and also to participate in Q&A in the community

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

edited Dec 3, 2024 2:35AM in Linux

After connecting to the instance as an opc user, when you try sudo to root user, the following error is seen:

[opc@<hostname> ~]$ sudo su - 

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

The above error occurs because ownership and permissions of /usr/bin/sudo were changed. 

/usr/bin/sudo file must be owned by root, if not the binaries cannot be executed. 

$ ls -al /usr/bin/sudo*

---x--x--x. 1 oracle oracle 143248 Jun 26 16:26 /usr/bin/sudo

lrwxrwxrwx. 1 oracle oracle 4 Aug 14 01:05 /usr/bin/sudoedit -> sudo  

---x--x--x. 1 oracle oracle 49008 Jun 26 16:26 /usr/bin/sudoreplay

From the above example, it's clear that the owner of the binaries is not

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!