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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-25-2012, 05:30 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2012
Posts: 3
Rep: 
|
sudo: effective uid is not 0, is sudo installed setuid root?
I'm new in linux ubuntu 12.04. i was installing jdk7. now when i run any command with sudo like :
sudo chown -R awlad /usr/
<b> sudo: effective uid is not 0, is sudo installed setuid root? </b>
i've googling for this about 2 hours.how can i solve this
more info:
ls -l $(which sudo)
give me:
-rwxr-xr-x 1 awlad root 112888 Jul 16 18:14 /usr/bin/sudo
Last edited by awladnas; 11-25-2012 at 05:46 AM.
|
|
|
|
11-25-2012, 05:55 AM
|
#2
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 12,146
|
Quote:
Originally Posted by awladnas
I'm new in linux ubuntu 12.04. i was installing jdk7. now when i run any command with sudo like :
sudo chown -R awlad /usr/
<b> sudo: effective uid is not 0, is sudo installed setuid root? </b>
i've googling for this about 2 hours.how can i solve this
more info:
ls -l $(which sudo)
give me:
-rwxr-xr-x 1 awlad root 112888 Jul 16 18:14 /usr/bin/sudo
|
Have you run a command like that successfully before? If yes then you have borked your machine. Changing the owner of all files in /usr to your own unpriviledged user is exactly what would cause such issues and is a good way to break your system.
|
|
|
|
11-25-2012, 05:58 AM
|
#3
|
|
LQ Newbie
Registered: Nov 2012
Posts: 3
Original Poster
Rep: 
|
Quote:
Originally Posted by TobiSGD
Have you run a command like that successfully before? If yes then you have borked your machine. Changing the owner of all files in /usr to your own unpriviledged user is exactly what would cause such issues and is a good way to break your system.
|
thanks for your reply. Yes may be i'm not sure. is there any way to overcome it?
|
|
|
|
11-25-2012, 06:49 AM
|
#4
|
|
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,612
|
Executable file /usr/bin/sudo must have root as owner, not any other user. And that is why it is saying that effective UID isn't 0 (since root has EUID equal to 0). Also note that changing owner of /usr/ may cause other problems to your system. So better try to change owner of /usr/bin/sudo, and then try installing jdk.
Code:
sudo su - root
chown -R root:root /usr/bin/sudo
Then try to install jdk.
If you get permission denied type of error while using sudo cmd then, check whether you've permissions to invoke it or not, using:
Last edited by shivaa; 11-25-2012 at 06:59 AM.
|
|
|
|
11-25-2012, 08:32 AM
|
#5
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 12,146
|
Quote:
Originally Posted by awladnas
thanks for your reply. Yes may be i'm not sure. is there any way to overcome it?
|
Something like that will normally cause a whole bunch of weird effects, the one with sudo you now can see is one of the harmless ones because it gives you a clear error message. If other issues occur I would recommend a clean re-install.
|
|
|
|
11-25-2012, 08:38 AM
|
#6
|
|
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,612
|
I would add, the executable /usr/bin/sudo has SUID set on it (-rwsr-xr-x), which means, when you will execute /usr/bin/sudo, you will get same authorization what it's owner i.e. root has. This concept is used for many other executables utilities such /usr/bin/passwd. So simple solution is to change it's owner to root again as suggested above.
|
|
|
|
11-26-2012, 12:58 AM
|
#7
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 14,956
|
@shivaa: As TobiSGD has pointed out, if the OP has run a cmd to change multiple file ownerships/perms, trying to fix them manually would be almost impossible and in the meantime could be open to exploits.
A re-install would be best.
There is a way to fix rpm based systems ( http://www.cyberciti.biz/tips/reset-...ermission.html) but it looks like .deb systems like Ubuntu can't do that.
|
|
|
|
03-15-2013, 10:20 AM
|
#8
|
|
LQ Newbie
Registered: Mar 2013
Posts: 1
Rep: 
|
Just open terminal and do "su"
then just type chmod 4755 /usr/bin/sudo
|
|
|
|
Yesterday, 06:49 AM
|
#9
|
|
LQ Newbie
Registered: May 2013
Distribution: Mint
Posts: 1
Rep: 
|
you could try reinstalling it
it worked for me
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|