Home > HOWTOs > sudo: effective uid is not 0, is sudo installed setuid root?

sudo: effective uid is not 0, is sudo installed setuid root?

Got into this issue on the server, when trying to install mysql-server.
 [zahmed@ahmed-server ~]$ sudo yum install mysql-server
sudo: effective uid is not 0, is sudo installed setuid root?
[zahmed@ahmed-server ~]$ sudo su
sudo: effective uid is not 0, is sudo installed setuid root?
Checking the permissions from the root login, looks messed up.
 [root@ahmed-server home]# ls -l /usr/bin/sudo
---x--x--x. 1 root root 123832 Nov 22 2013 /usr/bin/sudo
Setting uid to sudo and proper permissions.
 [root@ahmed-server home]# chmod 4755 /usr/bin/sudo
Lets check the permissions now and take it for a spin.
 [root@ahmed-server home]# ls -l /usr/bin/sudo
-rwsr-xr-x. 1 root root 123832 Nov 22 2013 /usr/bin/sudo
[root@ahmed-server home]# su zahmed
[zahmed@ahmed-server home]$ sudo su
[root@ahmed-server home]#
We are all set. Below are few bit setting options.
 #To add the setuid bit
chmod 4755 /usr/bin/filename

#To set the setgid bit
chmod 2755 /usr/bin/filename

#To set both the setuid bit and the setgid bit
chmod 6755 /usr/bin/filename
Advertisements
Categories: HOWTOs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: