When I Run Any Sudo Commands I get:
sudo: /private/etc/sudoers.d is owned by uid 501, should be 0
sudo: no valid sudoers sources found, quitting
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:
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.
This script works for me to have sudo commands but only when its running:
do shell script "chown root:wheel /etc/sudoers; chmod 440 /etc/sudoers; chmod -N /etc/sudoers" with administrator privileges
would this command fix it? :
sudo chown -R root:wheel /private/etc/sudoers.d
HELP!