I was shown this by a friend the other day. If you're not really paranoid, this is quite useful.
I use sudo quite a lot and get bored of typing my password in every time I use it. There is away around this, but only do this if no one else uses your machine or you don't leave your self logged in. Start a terminal and type:
% sudo visudoNow the only way to edit this file without playing around with chmod and so on is with visudo; this is a command used just to edit the /etc/sudoers file. It also does checks to make sure the formatting is correct. The following is the important part of the file. It basically says user 'root' can do all commands, group 'admin' can do all commands:
# User privilege specificationYou need to change this so it has NOPASSWD: before the last "all" for the admin group, so it looks like this:
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
# User privilege specificationYou can also add you username to the file:
root ALL=(ALL) ALL
%admin ALL=(ALL) NOPASSWD:ALL
# User privilege specificationNote: Those are tabs after the username and group name.
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
user_name ALL=(ALL) NOPASSWD:ALL
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021202054815892