0

I recently updgraded MacPorts from 1.9.2 to 2.0.3. Since then, I've lost the ability to run as sudo.

sudo: can't stat /opt/local/etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting

Unsure if these are related, but I'm wondering what the best course of action is at this point.

port installed returns

sudo @1.7.4p2_0
sudo @1.7.7_0 (active)

Further investigation suggests I've installed MacPorts' sudo without an accompanying /opt/local/etc/sudoers file. I've managed to create such a file using visudo, copying the content of /etc/sudoers, chmod to 0440 and ownership to root:wheel.

I guess the question now is whether I should use MacPorts' sudo or uninstall it? And how did I end up with installing the MacPorts' sudo?

wmfox3
  • 2,141
  • 4
  • 21
  • 28

1 Answers1

1

Not a Mac man myself, but have a look at this page:

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/sudoers.5.html

...and also a look at the man page for visudo, which is used to edit the sudoers file:

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/visudo.8.html#//apple_ref/doc/man/8/visudo

Christopher
  • 764
  • 4
  • 6