Jump to content

How to fix/survive a broken sudo


Recommended Posts

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

That kind of problem.

 

Option 1

 

Control + Alt + F3 

 

log in as root  and live without sudo

 

Option 2

 

Open a terminal

ssh root@127.0.0.1

 

and log in as root

 

Option 3

 

 

copy this to a file named /tmp/armbiansudo.txt

 

chown root:root /usr/bin/sudo 
chmod 4755 /usr/bin/sudo
chown root:root /usr/lib/sudo/sudoers.so 
chmod 4755 /usr/lib/sudo/sudoers.so
chown root:root /etc/sudoers
chown root:root /etc/sudoers.d /etc/sudoers.d/README  /var/lib/sudo

 

 

And now  follow option 1 or option 2 and type this on a root term

 

bash  /tmp/armbiansudo.txt

 

I think  sudo gave me problems in the past, I suspect it was behind some permissions problems that made me reinstall the OS, so i would recommend option 1 or option 2, I tried option 3 to test if the fix still worked before post it here, I would post here if I have problems again.

 

 

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines