LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-20-2007, 11:48 AM   #1
gvp87
Member
 
Registered: Mar 2007
Location: Boston
Distribution: Ubuntu Gutsy
Posts: 50

Rep: Reputation: 15
Can't become root!!!!


everytime I enter in a command that requires root access using sudo, i get an error message :
sudo: must be setuid root

and I can't perform any action that requires me to be root. I even tried using gksu instead of sudo, but I still get the same exact error message.

The only thing that I had done previous was:
sudo chmod 777 /usr/bin/*

and it worked. The very next command I used was sudo apt-get and that's when I got my error message. I rebooted my computer, but still nothing.

Any insight would be greatly appreciated.

giuseppe
 
Old 09-20-2007, 01:27 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, oops.. 'chmod 777 /usr/bin/*' sets the mode of all files exactly to 777. In particular, SUID bit (that means that the binary is executed with root privileges initially, but knows who called it). And the only way a process started by an ordinary users gains root privileges is through a similar SUID "gate". So you need to chmod sudo executable 'u+s'. For it you will probably need to boot from installation media and mount your system.
 
Old 09-20-2007, 01:32 PM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Shouldn't it be enough to boot into single-user mode? That should give a root login without passwords usually..I haven't tried with Ubuntu recently, but that's probably easier than booting off the installation media and mounting the partitions..

When GRUB pops up, enter the menu, press 'e' to edit the boot section you usually use (the hilighted one I guess; it should tell about the 'e' button at the bottom), hilight the line that starts with word 'kernel', press 'e' again to edit the line, add the word 'single' to the line among the other options, press ENTER and 'b' to boot. Hopefully you end up logged in as root on the command line..then issue the chmod explained in the previous post and reboot.
 
Old 09-20-2007, 01:37 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
I'd say that booting from LiveCD is simpler sometimes. Personally I would use not just single-user mode, but plainly init=/bin/sh, but whatever of these ways you choose, you have to remember about Ctrl-Alt-Del and how should it work here, without init you even need to think about filesystem state on reboot.
 
Old 09-20-2007, 06:34 PM   #5
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Rep: Reputation: 30
Quote:
Originally Posted by gvp87 View Post

The only thing that I had done previous was:
sudo chmod 777 /usr/bin/*



giuseppe
Forgive me for my ignorance but doesn't this effectively break your install?
 
Old 09-20-2007, 08:35 PM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
In a sense. If you have no root password, and sudo is in /usr/bin, it deprives you of it.. Really only so many programs need to be SUID.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 08:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration