sudo: effective uid is not 0, is sudo installed setuid root?

Salih Kardan picture Salih Kardan · Sep 4, 2013 · Viewed 32.6k times · Source

I am trying to create deb package from LXC rootfs, and after creating it I want to install that package any computer. Up to this point I achieved packaging and installing deb package, however after installation of LXC package, I cannot be superuser in that lxc. I get this error when I use "sudo" command.

sudo: effective uid is not 0, is sudo installed setuid root?

thanks in advance.

Answer

Gustavo Matias picture Gustavo Matias · Jan 4, 2014

I just had this same exact problem on Mac OS after strangely deciding to screw my own system by doing: sudo chmod -R /usr/bin. If that's someone else's case just open Disk Utility, select your OS disk ("Macintosh HD" in my case), go to First Aid tab then hit Repair Disk Permissions, wait a few and things should get fixed.