Sudo without a password in Mac OS X
Mac OS X users who spend a lot of time in Terminal may find having to enter their account passwords when using sudo to be inconvenient. A few simple steps can disable this and allow you to use sudo without ever needing a password in Mac OS X 10.6 Snow Leopard. The steps are similar for 10.3, 10.4 and 10.5 however /etc/sudoers
may be slightly different.
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 “#”)
# %wheel ALL=(ALL) NOPASSWD: ALL
Then, in Terminal run the following command as root, replacing your_username
with your account username:
dscl . append /Groups/wheel GroupMembership your_username