Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rickydick

macrumors newbie
Original poster
Hello!
My MBA 2011 running El Capitan has started to have weird behaviour, so I want to do a clan install of El Capitan from a bootable USB drive.
I have the El Capitan installer file, but I cannot create the bootable installer in terminal with:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/USBdrive --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

I always get the following error:
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting

I suppose my sudo permissions got corrupted... Anybody can tell me how to repair permissions of sudo?

I know this should be possible using single user mode, but I have no clue as which commands would do that.
I already run ONXY's permission repair, but this apparently does not repair the sudo.

Thanks for your precious help!
 
Hi everybody,
Just resolved the problem with the help of this article:


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




My sudo is repaired, and my USB drive in about to be prepared 🙂
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.