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

When ever i use a "sudo" command, it returns "sudo: can't open /etc/sudoers: Permission denied".... HELP PLEASE

While using terminal, any commands with sudo returns the statement seen in the heading... I have only a basic idea of whats happening, so please try and make the solutions simple.. much appreciated

MacBook Pro, Mac OS X (10.6.8), While using Terminal

Posted on Jul 11, 2012 3:41 AM

Reply
26 replies

Jul 11, 2012 7:35 AM in response to Umar_Kagee

Are you being prompted for a password? Are you using the same password you sign in with? Try just entering sudo with:


sudo su -


It will ask you for a password and then give you a stern warning about acting as root, where you can really mess up your computer for good if you are not careful. If it won't change to the root account you have a permission problem or a credentials problem.

Jul 11, 2012 7:51 AM in response to Umar_Kagee

Then something is wrong with your account or password. This may have changed while you were root and will be hard to trace down.You have not said, does not prompt you for a password? Are you using the same one for your account?


What do you get when you issue this command?


ls -la /private/etc/sudoers


You want to see:


-r--r----- 1 root wheel <date> /private/etc/sudoers


You may need to reboot in single user mode to correct this. Perhaps Apple Support has a document on restoring the permissions. Did you add some software or make a change recently?

When ever i use a "sudo" command, it returns "sudo: can't open /etc/sudoers: Permission denied".... HELP PLEASE

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