1

After running the (stupid) command :

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

Having $(npm config get prefix) being equal to /usr, I have changed the ownership of /usr/bin/sudo to my administrative user. Now when I try to sudo I get the following error :

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

It was a fresh Ubuntu installation so I don't mind reinstalling but if there is another way I'm in. Note that I had not set a password for root so I believe I have no way to login as root. If I could it would be great, I would just chown -R root:root /usr/bin and it would fix my problem.

My /etc/ folder is still owned by root and everything works fine except sudo giving the above error message.

Mouradif
  • 149

0 Answers0