I'm trying to setup
sudo with no password but still I get prompted for password.
I'm using Ubuntu, here is the relevant line from the sudoers configuration file :
gandalf ALL=(ALL:ALL) NOPASSWD: ALL
Try dropping the extra :ALL, example:
gandalf ALL=(ALL) NOPASSWD: ALL
Do you have other rules in your
sudoers file, by any chance? The rules are applied in order, so if you have a rule allowing you to run a command with a password prompt followed by another rule that allows you to run the command without a password prompt, you'll have to type the password. Put the no-password rule first.
My "man sudoers" on ubuntu contains this example line
FULLTIMERS ALL = NOPASSWD: ALL
FULLTIMERS is an alias rather than a user, but it should still work if you put a user name there. As far as I know, NOPASSWD: has to come before the first mention of ALL (after the equals sign) to bind to it.
I use a group call
sudo and have the line
%sudo ALL=NOPASSWD: ALL
which seems to work.