Find the answer to your Linux question:
Results 1 to 6 of 6
I made another account called xavier earlier today. I then proceed to add that account through visudo. When I use sudo, I get this error. sudo: must be setuid root ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    10

    New account returns sudo: must be setuid root


    I made another account called xavier earlier today.
    I then proceed to add that account through visudo.

    When I use sudo, I get this error.

    sudo: must be setuid root

    _________

    Here is the output of ls -la $(which sudo)
    from the root account..

    Code:
    ---x--x--x 1 root root 219272 Sep 24 19:48 /usr/bin/sudo

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,317
    Hello and welcome!

    It is odd that your distro did not install it that way. Did you modify the file? What is your distro?

    If it is RPM-based, try this:
    Code:
    rpm -qV sudo
    you can make it suid with this command (run as root):
    Code:
    chmod +x /usr/bin/sudo

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    10
    I apologize, I thought I posted the OS. I didn't.
    I don't believe I ever edited the file.

    It's a server I purchased offshores, so I can only access it through SSH.
    Its CentOS 6.3x

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,317
    Quote Originally Posted by xavieranderson View Post
    I don't believe I ever edited the file.
    Run the rpm command I suggested. It will tell you the state of the package that owns the sudo binary.

    It's a server I purchased offshores, so I can only access it through SSH.
    Its CentOS 6.3x
    I don't remember, but maybe CentOS ships that way, for security purposes (forcing root to manually change the binary to be suid). You can run the chmod command I suggested to fix it.

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    93
    Quote Originally Posted by atreyu View Post
    Hello and welcome!

    It is odd that your distro did not install it that way. Did you modify the file? What is your distro?

    If it is RPM-based, try this:
    Code:
    rpm -qV sudo
    you can make it suid with this command (run as root):
    Code:
    chmod +x /usr/bin/sudo
    I'm pretty sure you meant (as root)
    Code:
    chmod +X /usr/bin/sudo

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,317
    Quote Originally Posted by clowenstein View Post
    I'm pretty sure you meant (as root)
    Code:
    chmod +X /usr/bin/sudo
    actually, i meant:
    Code:
    chmod +s /usr/bin/sudo
    but good catch!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •