Making the sudo command work on macOS Ventura

When trying to install software through the terminal the command 'sudo' was no longer applicable. I tried to subvert the issue through installing several binaries but sudo did not work and the apple-fora could not provide an answer. I tackled the problem after some time. I created a new user account with administrative privileges. Downloaded Iterm2 and installed Homebrew, and after that I used Homebrew to install Curl and Wget, and Git. After that I used iTerm to install zsh (https://www.sitepoint.com/zsh-tips-tricks/) and made sure the shell in iTERM used zsh. Whereas apple's native terminal is not willing to receive sudo commands, iTerm will and users can install software through iTerm using the sudo-command."


Posted on Oct 20, 2023 8:35 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 20, 2023 8:43 AM

sudo works just fine in Ventura. I use it all the time.


Did you give macOS Terminal "Full Disk Access"?

Did you give iTerm2 "Full Disk Access"?

System Settings -> Privacy & Security -> Full Disk Access


Are you logging into an 'admin' account or a 'standard' account? This would be System Settings -> Users & Groups, and it should say 'admin' under your account name.

2 replies
Question marked as Top-ranking reply

Oct 20, 2023 8:43 AM in response to oscarmacdutch

sudo works just fine in Ventura. I use it all the time.


Did you give macOS Terminal "Full Disk Access"?

Did you give iTerm2 "Full Disk Access"?

System Settings -> Privacy & Security -> Full Disk Access


Are you logging into an 'admin' account or a 'standard' account? This would be System Settings -> Users & Groups, and it should say 'admin' under your account name.

Oct 20, 2023 1:14 PM in response to oscarmacdutch

I've also never had any issues like that. What happens when you did attempt to use "sudo"? And what commands were you attempting to use? There are some areas where on the macOS boot drive where even an admin user with "sudo" will be unable to make modifications to the file system. The complete macOS system area now resides on a read-only signed & sealed system volume that cannot be modified by anyone. Basically users are restricted to writing to the "/Users" folder area and some system configuration files which have been linked to a writeable volume.


In addition to the excellent points & questions by @BobHarris, Are you running any anti-virus apps, cleaning/optimizer apps, or third party security software? These types are known to cause all sorts of problems and interfere with the normal operation of macOS.


I see you posted in the macOS Ventura forum, is that indeed the OS you are currently using which has this problem? I know that Sonoma has some very odd configuration defaults where some macOS system utilities don't even have "Full Disk Access" by default.


FYI, we have been seeing a lot of posts on these Apple forums recently where Homebrew has been causing people a lot of headaches by improperly configuring the system causing some basic macOS functionality to be broken at least in regards to using the command line. So be careful.

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.

Making the sudo command work on macOS Ventura

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