Sunday, March 28, 2010

sudo: must be setuid root

I did a silly thing this morning. I "chown"ed my /usr directory on my macbook pro to my username. This broke all commands like sudo, su etc and they became unusable. I couldn't chown it back to root anymore.

After a long hard search for 2 or even more hours I remembered seeing something about disk permissions in the mac osx "disk utility".

A quick "Command-Spacebar" to bring up spotlight search dialog, and then type in disk utility brings up the following window.


Selecting the drive to repair and clicking the "Repair Disk Permissions" Button at the bottom repairs all permissions on the file system.

Now I can "sudo" and "su" again.

No comments:

Post a Comment