Suresh Payankannur

Friday, November 15, 2013

Mac OS username not in sudoers file

Recently run into this error when trying to run a command with sudo and got this error:

'username' not in sudoers file

The solution is to log in as a user with admin privilege and edit the /etc/sudoers file. Add the user whom you want to provide sudo privilege into this file as a separate line. For example, add the last line and replace the username with the your username.
# User privilege specification
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
username ALL=(ALL) ALL ---> Added


Post a Comment

Blog Archive

Scroll To Top