LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sudo stopped working: "must be setuid root" (https://www.linuxquestions.org/questions/linux-software-2/sudo-stopped-working-must-be-setuid-root-549723/)

quincy_the_penquin 04-28-2007 10:30 AM

sudo stopped working: "must be setuid root"
 
I type in "sudo whatever" and it says in the terminal "sudo: must be setuid root". This just started today, and I can't do anything under sudo or gksudo. Help!

Mizzou_Engineer 04-28-2007 10:40 AM

The actual "sudo" command has to be setuid root. If you type in "ls -l /usr/bin/sudo" you should see:

----s --x --s 1 root root <size> <date> /usr/bin/sudo

The "----s" means that it's setuid root. Yours probably is missing the s. You can reset sudo to setuid root by executing the following commands:

su - (logs you in as root)
chmod +s root /usr/bin/sudo (sets UID root)
exit (logs you out)

Then it should work.

quincy_the_penquin 04-28-2007 11:09 AM

oops.
 
My bad. It turns out that I, in a moment of sheer insanity, chowned /usr/bin and everything in it so I could fiddle around with the executables in it. Thanks for the help, though.

natv 04-29-2007 10:13 PM

Hi guys,

I'm having a similar problem. I checked through the forum here and Google, and the only advice I found was to make sure the command I'm trying to run is SUID root, and that it's not on a partition mounted with the nosuid option.

I'm running on a VPS if that helps (/etc/fstab doesn't show me anything, but I don't think it would be mounted with a nosuid option (?)


I'm trying to enable sudo to the '/sbin/service' command.

The sudo command is SUID root, I even did chmod 4111 earlier to be sure:

---s--x--x 1 root root 93816 Apr 29 20:47 /usr/bin/sudo*


But when I try to run a sudo command to stop/stop a service, I get the error:

Sorry, sudo must be setuid root.



Any ideas?


Thanks
Nat

natv 04-30-2007 06:37 AM

Solved my problem..

My shell was "jailed shell" so the actual sudo binary for jailedshell is in a different location. duh


Solution: either use full shell or set suid on the jailed shell binary of sudo


Nat


All times are GMT -5. The time now is 06:26 AM.