How To
Generated By:
HostMyApple

How to fix macOS error “/usr/bin/sudo must be owned by uid 0 and have the setuid bit set”

Occasionally it is possible when making changes with the “root” account to mess up permissions in macOS for “sudo”


When this occurs if you attempt to use the “sudo” command inside of terminal you may experience the error message:
"/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

If you have encountered this error it is very likely that you already have access to the root account however if for some reason you do not you can read the following article here:(How To Enable Root in macOS) to learn how to enable the “root” account.


After the root account is enabled…


Log out as the current user, then log back in as root.


Execute the following in terminal:

chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo


Log out as root, then log back in as the current user.

After this try sudo again and you should be successful.

If you see this issue on macOS feel free to contact us and share your findings on this issue.
Also, if you want to check out the best virtual cloud macOS servers visit www.hostmyapple.com/macvps.html for information

More From Blog

You Might Also Like

Troubleshooting
The Ultimate Fix for macOS Keychain issues!
Read More
How To
Simple Steps for Setting Up L2TP VPN macOS Sierra
Read More
How To
How to change Xcode derived data and archive directory locations
Read More