sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting

I am trying to empty my trash but it wouldn't . so I ran this command sudo rm -rf ~/.Trash/* in the terminal

I got an error message

"sudo: unable to stat /etc/sudoers: No such file or directory

sudo: no valid sudoers sources found, quitting"

does anyone have a clue? thanks

MacBook Pro with Retina display, Other OS, OS X 10.9.4

Posted on Nov 4, 2014 3:45 PM

Reply
4 replies

Nov 4, 2014 6:08 PM in response to abolanrewaju

First, never use the shell (Terminal) to empty the Trash. It's dangerous and unnecessary, and it usually doesn't work.


A necessary system file is missing. If you know how that happened, restore it from a backup. Otherwise, see below.

If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.

If you use FileVault 2, then before running the Installer you must launch Disk Utility and select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another icon with the same name. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main Recovery screen.

There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.

*The linked support article refers to OS X 10.10 ("Yosemite"), but the procedure is the same for OS X 10.7 ("Lion") and later.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.