7
1
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.
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
2Nice one. :-P Always a better idea to elevate your own privileges than to change the permissions of your core directories. The permission denied you were getting was likely due to another problem. – NReilingh – 2012-03-26T03:33:41.907