PROBLEM with SUDO "must be setuid root" [closed]

1

So, I think the title is self-explanatory. I'm a beginner on Linux, I've been trying to install Steroids (test environment for hybrid APP's) following this tutorial (the second, from installation), and now whenever I try to use SUDO this message appears:

    
asked by anonymous 14.02.2015 / 06:47

2 answers

3

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

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

When you use the chown command with the -R option, you tell the system to change the owner of files and group information recursively in their subdirectories and files. Which certainly affected sudo .

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

Fromthebootmenu,selectrecoverymode,itisusuallythesecondbootoption.

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

In recent versions of Ubuntu, the file system is mounted 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 you have done this, you will be in the terminal as superuser, type:

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

After running the above commands, exit the session:

exit

This will take you back to the recovery menu.

Choose to resume a normal startup. You should then be able to use sudo again.

Fonte

    
14.02.2015 / 13:38
1

Possibly you have not set the root password, try to do this:

$ sudo passwd root

Type the password for the root user then try installing the packages you want.

If it does not work check the permissions of the sudo file

$ ls -l /usr/bin/sudo

And put it there

Ok, 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 can not, you will have to go into recovery mode and type these two commands that I have passed.

To enter recovery mode: link

    
14.02.2015 / 11:30