Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

benny3t3

macrumors newbie
Original poster
Feb 26, 2012
4
0
sudo: /opt/local/etc/sudoers is owned by uid 503, should be 0

Hi all, as you can see, I totally screwed up my sudoers file, actually, I did it a looong time ago, but decided to live with it. Now I want it back.

I know what caused the issue, I overwrote the file in finder and now I can't access the System or Wheel in permissions in GetInfo to repair permissions.
Well, at least i'm sure that is worth noting.

Long story short: sudoers is owned by uid 503, should be 0

cause:
:broke sudo (can't remember how, I didn't even program at all back then)
:edited sudoers without visudo(synax errors)
:found an original copy of the sudoers file and replaced the text in the sudoers file with that.
:fixed the resulting issues with permissions using chmod in single user mode.
:the above error occurs.

Oh and, if anyone could link me to a tut on XCode(The software), or some pdf or book, I would appreciate it. all of these issues are making C++ much more difficult to use than Java and as3... Is there some sort of central documentation for unix programming?

I appreciate your help.
 
Well, I have two sudoers files; don't ask me why. One in /etc/sudoers and one in opt/local/etc/sudoers.
As for having the root account enabled. I am not sure what you mean.
I am an administrator if you mean that.
 
Log in as root and fix it, that's the easiest way to reset the permission on this file
 
Easy as pie! Just logging in as root and doing:
visudo /etc/sudoers //open sudoers file with visudo
SHIFT+://open vi prompt
qw //quit and save
hoorah! File owned by 0. Everyone is happy. Thanks maflynn and Dweez.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.