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

imprvws

macrumors newbie
Original poster
May 7, 2021
1
0
Buenos Aires, Argentina
When I Run Any Sudo Commands I get:


Code:
sudo: /etc/sudoers is owned by uid 501, should be 0

Code:
sudo: no valid sudoers sources found, quitting

Code:
sudo: error initializing audit plugin sudoers_audit

This behavior starts at a failed mongodb installation and increased by the last 11.3.1 big sur update.
Several Apps Crashing. I did a little research and some people recommends starts in safe mode and run:


Code:
chown root:wheel /etc/sudoers

But i forgotten (by now) the firmware password. So when i try to run any init shortcut prompts for the firmware password.

Please someone tell me what's happening.
 
Last edited:

Honza1

macrumors 6502a
Nov 30, 2013
940
441
US
No idea about sudoers, but you really want to know firmware password. Did not say which mac you have, but I believe you need to take it to Apple with proof of ownership and they can reset the firmware password for you. At that time you can also ask them.
One thing comes to mind, reinstall the system, in place, using full installer for Big Sur. I would assume that will reset the ownership/permissions. But since you upgraded to 11.3.1 and that did not help, not sure if this is solution.
 

HDFan

Contributor
Jun 30, 2007
7,302
3,349
One thing comes to mind, reinstall the system, in place, using full installer for Big Sur. I would assume that will reset the ownership/permissions. But since you upgraded to 11.3.1 and that did not help, not sure if this is solution.
Doing a full install of 11.3.1 after the upgrade fixed a number of problems on my system introduced by the upgrade.
 

casperghst42

macrumors regular
Jan 11, 2006
159
111
On your command line run:

$ id

It should give you your users information, and I guess that that the uid is 501 - that means that /etc/sudoers is owned by your users. And if it is, then you should be able to change the owner to root:wheel:

$ chown root:wheel /etc/sudoers

If the above is not the case, then boot into single user or recovery mode and try to change the owner there:

$ chown 0:0 /etc/sudoers

Or if it's really one of these chases where nothing is possible, then grab an external USB disk, install MacOS on it, and do it from there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.