Reputation: 183
Currently, I am working on an OSX Maverick, and I can't use sudo
command in Terminal.
My-Mac:~ phucnd$ sudo
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting.
How can i fix it ?
Upvotes: 15
Views: 23203
Reputation: 3557
sudoers
> Get Info
5. Try running sudo ls
and see if you get any errors. If you get an error about sudoers.d
just delete that folder if its empty.
Upvotes: 1
Reputation: 1652
Finder -> Go -> Go to folder
and enter /etc/sudoers and push Go button. Right click on the sudoers -> click on get info -> change permission to: System: Read & Write Wheel: Read Only Everyone: Read Only
Lock it and open a terminal and try again.
All the best!
Upvotes: 5
Reputation: 371
1.Enable root user:
System Preferences -> Users&Groups -> Login options -> Network Account Server -> Join -> Open Directory Utility -> Edit(menu) -> Enable Root User
2.switch to root,change /etc/sudoers permissions
$su
$chmod 440 /etc/sudoers
Upvotes: 8
Reputation: 322
Finder → Go → Go to folder:
and enter /etc/sudoers
and push Go
button.
Right click on the sudoers
and change ther permission.
Upvotes: 16
Reputation: 81
Just use these commands below under any terminal will do:
$ su
$ chmod 440 /etc/sudoers
Upvotes: 1
Reputation: 228
Open Disk Utility, select you disk and click "Repair Disk Permissions"
Upvotes: 11