Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"sudo: can't open /private/etc/sudoers: permission denied"

I have been running Ascentemu. Dont ask what it is, its just cool.

I compiled it myself...

Anyways, to run it I type:
sudo sh ascent.sh
sudo sh logonserver.sh

But when I do that i get:
"sudo: can't open /private/etc/sudoers: permission denied"

I repaired permissions but it did not help...
I made sure it is 0440 (read only for system and wheel)...

Please help!!
Sully

Mac Mini, Mac OS X (10.5.1), 1 External HD, 150 GB, iPod Touch 8GB

Posted on Jan 18, 2008 2:58 PM

Reply
35 replies

Jan 19, 2008 5:48 AM in response to RSully

Looks like bad syntax..... get rid of "sh".

sudo ascent.sh

You know it doesn't matter what you name the script / binary. Just because it's script.sh doesn't necessarily mean you have to use the sh shell. It could be called script.purple.elephant and run in tcsh or whatever. If you have to use sh then launch it first and then do the sudo command.

hth

Jan 19, 2008 11:19 AM in response to brainslice

no, it is SH.. i need to do:
sudo sh ascent.sh

It does it even if i just type:
sudo

I might just end up turning the root account on... But I really would HATE to do that, it is a server. I dont want to worry about securlty..

If anyone knows how to fix:
sudo: can't open /private/etc/sudoers: Permission denied

then please help me!!!

For some reason it seems like the System cant read the file..
I made sure it was 0440 (permissions)...

I wil check it again, but if it is anything other than 0440 it yells at me...

Jan 23, 2008 11:40 AM in response to RSully

To check the SUID bit, do the following....

ls -l /usr/bin/sudo

This should give you..
"-r-s--x--x 1 root wheel 206K Sep 23 22:29 /usr/bin/sudo"
Which corresponds to numeric permissions of 4511.

Also try to do...

sudo -V

and see if it spits out anything. Mine reports "Sudo version 1.6.8p12"

I did some digging around and it looks like maybe your sudo binary got jacked up somehow.

"sudo: can't open /private/etc/sudoers: permission denied"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.