I recently received a new laptop for work - a shiny new MacBook Air. Lots of things to like about this machine.
However, after setting up my new account, etc. etc. I noticed that certain apps wouldn't install. Citrix Receiver, for example. (Don't ask...)
Consulting the Console, I observed messages ala the following:
root : can't open /private/etc/sudoers : Permission denied ; TTY=unknown ; PWD=/private/tmp/PKInstallSandbox.J6J7fY/Scripts/com.citrix.ShareFile.installer.zTdyaJ ; COMMAND=chown
A quick check in terminal revealed:
sudo: can't open /private/etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
Luckily, I'd set up a root user account (via the OpenDirectory management app ... see instructions here http://support.apple.com/kb/ht1528) which meant that I wasn't trapped in hell.
Rather, I could simply do this
$ su -
Whew. I'm still god.
A quick look around confirmed that, yes, indeed, /private/etc/sudoers existed. Hmmm
After much digging, a reference to the middle of this support thread saved me further wasted time:
Here's the skinny, thanks to Adam Wenocur:
The key is this - for whatever reason, the permissions of the *root directory* of my drive were bogus. Note that I'd *already* done the Disk Utility Repair Permissions dance. It found a few gnats and fixed them, but not this.
The fix was simple, once you are logged in as root:
root# chmod g+x /
And voila: I can use sudo again.