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

OCI: Unable To Switch to root User from opc User

Applies To:

Oracle Cloud Infrastructure


Linux OS


Symptoms:

Can't switch from opc user to root user. sudo(8) fails with: "sudo: /bin/sudo must be owned by uid 0 and have the setuid bit set".

[opc@xxxxxx ~]$ sudo su –
sudo: /bin/sudo must be owned by uid 0 and have the setuid bit set
[opc@xxxxx ~]$ ls -l /bin/sudo
-rwxr-xr-x. 1 opc root 191040 Feb 14 10:11 /bin/sudo

Cause:

To execute with elevated privileges, sudo(8) needs to be owned by the root user and have the stickybit (i.e. setuid bit) set.


Solution:

  • Get into single user mode by editing the GRUB2 boot entry by appending "

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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