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

后端 未结 3 1721
心在旅途
心在旅途 2021-01-04 10:28

I found another question with the same headline, however, I suppose my case is a bit different.

In an attempt to setup the new project, I needed to install nodejs.

相关标签:
3条回答
  • 2021-01-04 10:36

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

    Noticed: ---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo

    user and group should be root and the sudo file should have setuid

    Should be ---s--x--x. 1 root root 123832 Aug 13 2015 /usr/bin/sudo

    and also double

    0 讨论(0)
  • 2021-01-04 10:39

    If anyone is still experiencing problems with sudo, I was able t solve it by checking the shell access of the account in WHM. I received the same error because the account had Jailed Shell restrictions. I set it to normal shell and the error was gone.

    0 讨论(0)
  • 2021-01-04 10:48

    The problem is that you probably changed permissions to the directory /usr/bin.

    To resolve that :

    1) First be sure that root is owner of this directory /usr/bin :

    chown root:root /usr/bin
    

    2) and change permission for this directory :

    chmod u+s /usr/bin/sudo
    
    0 讨论(0)
提交回复
热议问题