0

After installing sudo in the system i am unable tu run sudo as a non-root user, when i try to execute any command i get:

/usr/local/bin/sudo: cannot execute

if i edit /etc/passwd to use a different shell i get:

/usr/local/bin/sudo: permission denied

the sudoers file seems to be correctly configured since the output of "sudo -l -U user" shows the user is able to execute only the commands i want it to use.

ls -l output is:

-rwsr-xr-x 1 root root 205396 Oct 8 2010 /usr/local/bin/sudo

  • try adding permissions to sudo for non root users to execute. that file looks like it can only be executed by the user root in the group root. – Kraang Prime Feb 25 '16 at 14:32
  • i reinstalled sudo and now permission look exactly the same as another working system: ---s--x--x 1 root root 217072 Sep 6 2010 /usr/local/bin/sudo, but the problem persist – Pablo Feb 25 '16 at 18:36
  • i tried what you said, i created another group and made it owner of the file...still cant be executed except by those in root group – Pablo Feb 26 '16 at 20:25
0

The problem was on the folder: /usr/local/bin It did not have the right permissions, once I corrected this "sudo" ran without problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.