sudo broke - "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"
#3
(07-07-2021, 04:26 AM)jlucas Wrote: Hi, not sure how that could have happened, but it should be easy to fix.

As the error message suggests, you have to set the setuid bit. This is what allows the `sudo` binary to elevate its privileges.
To do so, you need to become root first, and since `sudo` is broken you have to use `su`. After that run the following command:
Code:
chmod u+s /usr/bin/sudo

The error message also says that `sudo` must be owned by uid 0 (root). Yours is owned by uid 0, but the group is set to gid 1000, so you might also want to change that to 0, although it's probably not necessary:
Code:
chown root:root /usr/bin/sudo


Hope that fixes it.


Thank you.  I ended up wiping the phone.  I tried su, but I couldn't get it to accept a password.  I tried my lockscreen password as well as the default 147147. 

Weird issue
  Reply


Messages In This Thread
RE: sudo broke - "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set" - by cowsay - 07-07-2021, 12:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PMOS test image: failed EG25 test broke modem fw MtnSk8 4 5,758 02-28-2021, 02:20 PM
Last Post: MtnSk8
  Can't find "sudo gedit" alternative mh4it 3 4,164 09-10-2020, 03:48 AM
Last Post: User 18618

Forum Jump:


Users browsing this thread: 1 Guest(s)