Problem with SUDO "must be setuid root"

Asked

Viewed 894 times

2

So I think the title is self-explanatory. I’m beginner in Linux, I went to try to install Steroids (testing environment for hybrid APP’s) following this tutorial (the second, installation), and now whenever I try to use SUDO appears this message:

inserir a descrição da imagem aqui

  • http://stackoverflow.com/a/19306929/3029543

2 answers

3


This problem probably occurred after you executed the command below (source):

sudo chown -R `whoami` `npm -g bin`

When using the command chown with the option -R you tell the system to change the file owner and group information recursively, in your subdirectories and files. What certainly affected the sudo.

To fix this you should reboot the system and go into recovery mode to reverse this process.

inserir a descrição da imagem aqui

From the boot menu, select the recovery mode, usually it is the second option of boot.

inserir a descrição da imagem aqui

After selecting the recovery mode and waiting for all boot processes, some options will be shown. In this case, you must initialize choose to open a shell as root.

In recent versions of Ubuntu, the file system is mounted as read-only, so you need to type the following command to reassemble as read and write, which will allow you to make changes:

mount -o rw,remount /

Once done, you will be in the terminal as superuser, type:

# mount --all
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo  

After the above commands are executed, log out:

exit

This will take you back to the recovery menu.

inserir a descrição da imagem aqui inserir a descrição da imagem aqui

Choose to resume a normal boot. Then you should be able to use the sudo again.

Fonte

  • Qmechanic73, I couldn’t get man. The first con running with the , remount / processed something. Then I tried to give remount / but it didn’t. Then it rolled around adduser meuuser sudo and was warned that I am already part of the group sudo.

  • 1

    @ropbla9 execute mount -o rw,remount / only once. If it doesn’t work, run "mount -o remount /". If Voce is using the version 12.04 (or more) perform "adduser sudo" if this does not work perform "sudo usermod -a -G sudo Nomedousuario".

  • I’m using the latest version of Elementary OS Luna

  • 1

    @ropbla9 You can comment on how you called the command chown when installing Steroids?

  • I don’t remember how I did anything, man.

  • 1

    i did so: mount -o,remount / - OK > adduser myUser sudo (user is already part of sudo) > sudo usermod -a -G sudo rop - OK. But it hasn’t worked yet.

  • this works. Even I had already solved with this same sequence I found in a response on the net. Anyway your answer is right!

Show 2 more comments

1

Maybe you have not configured root password, try to do this:

$ sudo passwd root

Enter the password for the root user ai try to install the packages you want.


If it doesn’t work check the sudo file permissions

$ ls -l /usr/bin/sudo

And put it there


All right, try logging in as root

$ su root

If you can enter enter the commands

$ chown root:root /usr/bin/sudo
$ chmod 4755 /usr/bin/sudo

If you don’t succeed you will have to go into recoil mode and type in these two commands that I passed.

To enter recovery mode: https://wiki.ubuntu.com/RecoveryMode

  • Adirkuhn, still nd http://3.ii. Gl/Lp4m2jstm.png

  • Adir Kuhn, I still can’t get it, man. I executed these last two commands in Recorey mode, both worked, but I still can’t use sudo.

  • Adir Kuhn, I tried to log into your system root normally and ask for a 'password', I try to put mine that I set up in the installation and will not.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.