How to fix /etc/ folder on Mac OS X

Posted by justinhj on Super User See other posts from Super User or by justinhj
Published on 2012-03-26T02:46:00Z Indexed on 2012/03/26 5:33 UTC
Read the original article Hit count: 269

Filed under:
|
|

I was following a tutorial which had this command to create a launchd.conf file in /etc/

sudo echo "some command" > /etc/launchd.conf

But it wouldn't work, I got permission denied after entering my admin password.

So it seemed like the permissions for the link were wrong, so I did 'sudo chmod 755 /etc/'

But now I can't load a terminal, I get the error The administrator has set your shell to an illegal value

If I tried to sudo a command now I get

sudo: can't open /private/etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting

Process tramp/sudo root@localhost exited abnormally with code 1

This is what the link /etc looks like, what should it look like, and how do I restore it?

lrwxr-xr-x 1 root wheel 11 Jul 21 2011 etc -> private/etc

/private/etc ...

drw-r--r-- 111 root wheel 3774 Mar 26 02:25 etc

edit: I'm using Mac OS X 10.7.3

© Super User or respective owner

Related posts about osx

Related posts about mac