I messed up bad, real bad.
I accidentally deleted the symbolic link to my /etc
directory. Now I can't create another one because I keep getting an error:
$ sudo ln -s /private/etc /etc
sudo: unable to stat /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Any help would be appreciated, thanks.
Output of ls -l /etc
:
$ ls -l /etc
ls: /etc: No such file or directory
My /etc
was symlinked to /private/etc
(sudoers is in there).
Best Answer
Soft-link /private/etc to /etc on your main Volume:
Replace
Macintosh\ HD
with the name of your main volume (if your forgot it, just enterdf
orls /Volumes/
and check for its name! Don't forget to escape blanks with a backslash.)