My Problem
I would like to be able to run sudo
commands on MacOS Sierra 10.12 without having to type a password.
What have I tried
I've read the following:
- Why does sudo ask for a password in terminal?
- allow sudo to another user without password
- Use sudo Without a Password on Your Mac
And changed the relevant part of my /etc/sudoers
file to:
root ALL=(ALL) ALL
%admin ALL=(ALL) NOPASSWD: ALL
%wheel ALL=(ALL) NOPASSWD: ALL
%wheel ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL) NOPASSWD: ALL
adamatan ALL=(ALL) NOPASSWD: ALL
My local user id (whoami
) is adamatan
.
I'm still being asked to type a password every few minutes when calling sudo
. Any idea what's wrong?
Best Answer
Open a terminal, run
sudo visudo
Edit the line:
To say:
Now, you should now be able to run
sudo
without password.