Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

sudo password not accepted in terminal

My sudo password is not accepted when trying to use the terminal in macOS Monterey.


I was trying to uninstall an application. Since I rarely us the terminal I don't know if this a recent problem.


Any help would be appreciated.


Bob

MacBook Air 13″, 12.5

Posted on Sep 5, 2022 8:55 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 5, 2022 11:15 PM

Make sure that you are using the correct password for your user account. If you are unsure of your password, you can reset it by going to the System Preferences -> Users & Groups -> Reset Password. or see here: https://support.apple.com/en-us/HT202860. If you are still having trouble after resetting your password, it is possible that the sudo command has been disabled on your system. To enable sudo, open the Terminal and type the following command:


sudo defaults write /etc/sudoers Defaults env_reset,sudo_user=YOURUSERNAME


Replace YOURUSERNAME with your actual username. This will enable the sudo command for your user account.



Similar questions

5 replies
Question marked as Top-ranking reply

Sep 5, 2022 11:15 PM in response to RJLJP

Make sure that you are using the correct password for your user account. If you are unsure of your password, you can reset it by going to the System Preferences -> Users & Groups -> Reset Password. or see here: https://support.apple.com/en-us/HT202860. If you are still having trouble after resetting your password, it is possible that the sudo command has been disabled on your system. To enable sudo, open the Terminal and type the following command:


sudo defaults write /etc/sudoers Defaults env_reset,sudo_user=YOURUSERNAME


Replace YOURUSERNAME with your actual username. This will enable the sudo command for your user account.



Sep 6, 2022 1:14 AM in response to Luis Sequeira1

You are absolutely right.


I made 2 mistakes. I initially ran terminal from a user account and entered a user account.password. Then I entered my admin password in the terminal, but was still logged in as a user.


When I ran terminal from an admin account and entered my admin password it was accepted.


Basic mistakes, thanks for your help!


Bob



sudo password not accepted in terminal

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