Often I receive questions about how to run
sudo commands on MacOS Sierra 10.12.x / 10.13.x without having to type a password.
Be aware that removing the password requirement to use sudo eliminates a level of security. If someone gains access to your account they will be able to easily escalate to root privileges.
First, edit /etc/sudoers and uncomment (remove the “#”)
The easy way to use the terminal and run the following commands:
%admin ALL=(ALL) ALL
and change it to:
%admin ALL=(ALL) NOPASSWD: ALL
limitlessv ALL = (ALL) NOPASSWD: ALL # where userid is limitlessv