LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 07-13-2011, 12:35 AM   #1
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Rep: Reputation: Disabled
sudo: must be setuid root


Hi All,

Suddenly my sudo stopped working. I am trying to mount usb to one of the directory
#sudo mount /dev/sdb /mnt/test
It throws me the error sudo: must be setuid root

This was working just a day back.
Please suggest

Thanks
Swamy
 
Old 07-13-2011, 12:37 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Hi, welcome to LQ!

And is is setuid root?

Code:
ls -l $(which sudo)
What distro are you running? Did you run any updates lately?



Cheers,
Tink
 
Old 07-13-2011, 02:51 AM   #3
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
-rwxrwxrwx 1 root root 119240 2009-06-22 13:03 /usr/bin/sudo

No I have not installed any components.
 
Old 07-13-2011, 02:57 AM   #4
nooneknowme
Member
 
Registered: Feb 2008
Location: Bangalore, India
Posts: 66

Rep: Reputation: 4
My sudo on SLES has suid bit set, maybe give it a try.

Quote:
node01:~ # ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 152716 Mar 1 2010 /usr/bin/sudo
node01:~ #
 
Old 07-13-2011, 03:31 AM   #5
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
Please let me know how to set the bit. Also for me chown/chmod is also not working..
buntu@ubuntu-desktop:~$ sudo chmod 4755 /usr/bin/sudo
sudo: must be setuid root
 
Old 07-13-2011, 03:47 AM   #6
nooneknowme
Member
 
Registered: Feb 2008
Location: Bangalore, India
Posts: 66

Rep: Reputation: 4
I think you will need to get to the recovery mode in ubuntu and correct the permissions.
 
Old 07-13-2011, 05:50 AM   #7
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
I am using the evaluation board which has this ubuntu linux running on it. There is no recovery mode.Is there any alternative?
 
Old 07-13-2011, 11:58 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Do you have a password set for root?

If you didn't do any updates/upgrades ... did you play with
chmod on the /usr directory?
If you didn't (I can't help but notice that your sudo is
ancient) I'd like to move this to Security as perms
changing spontaneously doesn't ring normal or healthy.


Cheers,
Tink
 
Old 07-14-2011, 12:45 PM   #9
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
unfortunately I dont have root passwod. I may have done(not sure) chmod to /usr directory.
Is this not allowed? please suggest
Thanks
 
Old 07-14-2011, 02:31 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
"Allowed"? As root (or user w/ sudo privileges) you can do
anything. Should you? Absolutely not. Unless you want to end
up in a situation like yours - it's certainly a great learning
experience.

To set things straight you can either boot or a rescue-cd and
fix the perms on sudo from there, or you could try booting into
single-user mode (not that I know how *buntu derivatives behave
when doing that in terms of root access).



Cheers,
Tink
 
Old 07-15-2011, 01:25 AM   #11
nooneknowme
Member
 
Registered: Feb 2008
Location: Bangalore, India
Posts: 66

Rep: Reputation: 4
Quote:
Originally Posted by Tinkster View Post
To set things straight you can either boot or a rescue-cd and
fix the perms on sudo from there, or you could try booting into
single-user mode (not that I know how *buntu derivatives behave
when doing that in terms of root access).

I highly doubt that he going into rescue mode and fixing the permissions will solve the issue. mswamy78 mentioned that he may have used chmod, and I suspect that it was with -R, that's the only way he could have changed the permission on sudo binary. There will be other binary's as well which are not showing issues as of now but may at a later stage come up with an issue.

The best I can suggest is to reinstall. To save himself from all the troubles .
 
Old 11-07-2012, 01:22 PM   #12
van_Zeller
LQ Newbie
 
Registered: Sep 2010
Location: Lisbon, Portugal
Distribution: Ubuntu, Lubuntu
Posts: 16

Rep: Reputation: 0
Hi,

I also have this problem. I was the cause of it. During some computer problems, booted the laptop from a live CD. Since I was having some problems accessing the hard drive on the PC and was in a hurry, I did chmod -R 777 * big mistake, I now see.

Can anybody help me correct this, please?

thanks!
 
Old 11-07-2012, 01:56 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,880
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
Since you have chmod'ed the whole system, as it seems (in which directory have you done that?) it may also be possible that a clean re-install is the easiest and fastest solution for you.
 
Old 11-07-2012, 05:59 PM   #14
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
For anyone with an rpm based system, you can fix perms etc properly with http://www.cyberciti.biz/tips/reset-...ermission.html
 
Old 11-07-2012, 09:31 PM   #15
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,778
Blog Entries: 4

Rep: Reputation: 282Reputation: 282Reputation: 282
Once check whether you've sudo access or not,
Code:
example% su root
example% sudo -l -U <your-username>
It will list all commands that you can run as sudo.
If you have enough privileges, then do SUID on /usr/bin/sudo, as:
Code:
example% chmod u+s /usr/bin/sudo
It should work then! Good luck!

Last edited by shivaa; 11-07-2012 at 09:35 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sudo:must be setuid root rahulkya Linux - Software 7 02-21-2011 03:25 PM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Sorry, sudo must be setuid root kurtdriver Fedora 6 10-22-2008 07:47 PM
How can I have a script owned as root and run as root by a user: setuid? stickey bit? abefroman Linux - Newbie 9 04-19-2008 05:15 PM
sudo stopped working: "must be setuid root" quincy_the_penquin Linux - Software 4 04-30-2007 06:37 AM


All times are GMT -5. The time now is 04:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration