2
strangely I cannot run the sudo command for every new account I create that is not root. The server is completely new and wasn't touched so I don't know what's wrong.
for every command I try to run with sudo with a normal user I get
sudo: effective uid is not 0, is sudo installed setuid root?
I tried various solutions I found on the web including
chmod u+s /usr/bin/sudo
and
chown -R root:root /usr/bin
but nothing helped.
ls -l `which sudo`
shows
-rwsr-xr-x. 1 root root 123832 Oct 15 02:14 /usr/bin/sudo*
and finally
type -a sudo | awk '{print $NF}' | xargs ls -lF
gives
-rwsr-xr-x. 1 root root 123832 Oct 15 02:14 /usr/bin/sudo*
what could be the issue?
Was that
ls -Fl which sudo
or do you actually have a file called/usr/bin/sudo*
? Also, is that really a . in the last position of the permissions string (-rwsr-xr-x.
)? Finally, please edit your question and add the output oftype -a sudo | awk '{print $NF}' | xargs ls -lF
. Just to be on the safe side. – terdon – 2015-04-02T23:52:41.430the file is called sudo, the * is added by putty and yes, there's a dot. I'll now add the result of your command – maddo7 – 2015-04-03T00:13:49.417
Oh, please also clarify that you're using putty. I doubt that will make a difference but the more information we have, the likelier someone can find an answer. OK, the
– terdon – 2015-04-03T00:32:43.660.
is indicative of a SELinux issue. Is this a machine you administrate? If so, please edit and explain your SELinux setup.