sudo: /private/etc/sudoers.d is owned by uid 501, should be 0 on MacOS Monterey Version 12.4

Hi I accidentally changed the owner of all the files in `/etc` directory to `joohom` instead of `root`


Now everytime I try to run a command with sudo, it keeps popping up the error

`sudo: /private/etc/sudoers.d is owned by uid 501, should be 0`


May I know how to fix this?


I have found other threads with a similar error, but they're all offering solutions for older Macs, which I have tried and didn't work.


Some other threads I found:

* https://apple.stackexchange.com/questions/157772/sudo-etc-sudoers-is-owned-by-uid-501-should-be-0


I'm currently using a MacBook Pro (Chip: Apple M1 Pro) with MacOS Monterey version 12.4


MacBook Pro 16″

Posted on Dec 21, 2023 8:28 AM

Reply

Similar questions

1 reply
Sort By: 

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: /private/etc/sudoers.d is owned by uid 501, should be 0 on MacOS Monterey Version 12.4

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