0

I was trying to install something and accidentally run following command.

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Now I am getting error when trying sudo -i.

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I have tried recovery mode and
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo but nothing is working.

1 Answers1

0

If you have a root password, you could try to logon as root and fix the permissions as root. Else boot from Linux live CD, ceome root there, mount the partition with your broken system, set correct permissions again there.

Bob
  • 401