It would be the right thing to say that I messed up!
Accidentally, I changed the owner of all files in /usr/bin to 'dev' from 'root'. Now, sudo does not work! If I use sudo with any command, I get -
sudo: effective uid is not 0, is sudo installed setuid root?
I cannot use chown
command to change the owner back to 'root'. This is a major set back!
Because this is a Virtual Machine, I cannot access the Recovery Console. Infact, even the reboot
command needs the user to have 'root' access.
Experts, please help me in getting control of the OS without having to re-image.
Thanks!
P.S - Possibly a duplicate but reposting as his solution was to start afresh.
More info -
su - root
always says incorrect password. Unfortunately, the owner of su
is also 'dev'.
I am able to create a new user using the GUI. It accepted the root password. How do I grant the new user with root access without using visudo.
vi
?vi
su
, then you're out of luck. What doeswhich su
says?