Just wanting a bit of advice. I have root access to a server and I want to create a second user and execute everything via sudo should I need to rather than logging in as root. The file /etc/sudoers reads as:
Defaults env_reset
root ALL=(ALL) ALL
%sudo ALL=(ALL) ALL
I have added a second user "bob" to the system and added them to the group sudo which should ensure that they can execute root commands. When attempting any sort of privileged action, I get the following error:
sudo: must be setuid root
My understanding is that I would have to set the SUID with
chmod u+s /usr/bin/sudo (or should this be g+s?)
which will enable me to execute sudo.
Are there are any security considerations I have to consider with this approach and is this correct? A lot of posts regarding this say that this is an error but the set up is a virtual server and I was only provided with root access. I believe /usr/bin/sudo
has deliberately not been set SUID to restrict other users from running it and to ensure that I have to explicitly set it.
sudo
binary, and the exact command you are trying to run?-rwxr-xr-x 1 root root 127668 2012-05-16 06:25 sudo
This is as expected. I just think it's a security precaution set by my VH provider in the way I described above.