Created
May 9, 2016 23:25
-
-
Save adamthebig/59f69e4bf921e1659e8d0aba53d8c2d5 to your computer and use it in GitHub Desktop.
Fix sudo: unable to stat /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reboot into single user mode (hold Option S while booting until it switches to text mode) | |
At the single user prompt, type: /sbin/fsck -fy | |
This checks the filesystem integrity | |
Then type: /sbin/mount -wu / | |
This mounts the root filesystem as read/writable. | |
Next type: /bin/chmod 1775 / | |
This will correct the permissions for your / directory | |
Type: /bin/sync | |
This will make sure the change is written to the filesystem | |
Type: exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment