Sample Header Ad - 728x90

Why can I not use `sudo` as a `Standard` user in macOS?

5 votes
1 answer
13174 views
I do most of the "work" I do on my Mac as a Standard user (Apple parlance for an *unprivileged* user). I also frequently use the CLI (zsh mostly now) via the Terminal app. I use [MacPorts](https://www.macports.org/) as a *package manager*, and various utilities such as find, rsync, launchctl, ip, mount, log, softwareupdate, etc etc etc. As it frequently happens, something I am trying to do from the CLI requires *privilege elevation* via the sudo command. However: According to [this document](https://support.apple.com/guide/terminal/enter-administrator-commands-apd5b0b6259-a7d4-4435-947d-0dff528912ba/mac) , it seems that Apple does not support the use of sudo by Standard users: >Only administrator users can use sudo. If you’re not logged in as an administrator, you can do so by entering the following command, where **adminUsername** is the name of an administrator user: >***% su adminUsername*** This seems clumsy and inconvenient: su and then sudo. It is also at odds with the way sudo works on other platforms I use. Of course macOS requires Admin user authentication to perform some tasks in the GUI, but this is *generally* not the way that sudo operates; i.e. ***any*** user may be granted privileges to perform specified tasks by the Admin user for the system. I won't ask "why" Apple does it this way as that can only be an *opinion* here, but I will ask if there is a *work-around* - can sudo on macOS be made to work as it does on other platforms?
Asked by Seamus (5329 rep)
Nov 14, 2020, 06:57 PM
Last activity: Apr 17, 2025, 11:21 PM