OCI: Unable To Switch to root User from opc User
in Linux
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 "
Tagged:
0