sudo on Mac: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Опубликовано: 02 Апрель 2026
на канале: TechIQ
638
3

Sudo must be owned by root, and have the set uid bit set. The set uid bit of the permission mask effectively makes the binary run as the user that owns it, no matter who invoked it. Thus sudo can change uid of whatever process it spawns.

By changing ownership on /usr/bin you've pretty much hosed your installation. A lot of binaries rely on suid, and having them owned by the user anyway opens you to a lot of interesting attacks.

https://en.wikipedia.org/wiki/Setuid has a good explanation of how suid works in detail.

At this point the best tip is to reinstall ubuntu... :)