Site icon AWS: © LimitlessV, Software Development Solutions.

How To Enable Sudo Without A Password On MacOS

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.


Warning!

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:

sudo visudo

Search

%admin ALL=(ALL) ALL

and change it  to:

%admin ALL=(ALL) NOPASSWD: ALL
limitlessv ALL = (ALL) NOPASSWD: ALL # where userid is limitlessv
USE SUDO COMMAND IN OSX WITHOUT A PASSWORD
Exit mobile version