sudo visudo
Change this line:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
to this line:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
And move it under this line:
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
then for every user that needs sudo access WITH a password:
sudo adduser <user> sudo
and for every user that needs sudo access WITH NO password:
sudo adduser <user> admin
and finally, run this:
sudo service sudo restart
And that's it!
Edit: You may have to add the admin group as I don't think it exists by default.
sudo groupadd admin
You can also add the deafult AWS ubuntu
user to the admin
group via this command:
sudo usermod ubuntu -g admin
groups 看自己在那个组
http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password
http://book.51cto.com/art/200905/126174.htm