sudo allows a system administrator to grant certain users (or groups) a permission to run privileged commands on Linux system. In order to run a command with sudo, users have to type their own password at a password prompt.

To allow a specific user to use sudo without a password, use visudo command to edit sudo configuration as follows. I assume that the user name for whom you want to disable password prompt is "alice".

$ sudo visudo

alice ALL=(ALL) NOPASSWD: ALL

Ctrl-X to leave, save your changes, and you're done. This setting will disable a password prompt for alice when she runs any command in sudo.

To allow a user to use sudo passwordlessly for specific commands only (e.g., /usr/sbin/tcpdump and /sbin/reboot), do the following.

$ sudo visudo

alice ALL=(ALL) NOPASSWD: /usr/sbin/tcpdump, /sbin/reboot

To allow all members of a specific group (e.g., alice_group) to use sudo without a password, run the following.

$ sudo visudo

%alice_group ALL=(ALL) NOPASSWD: ALL

To allow all members of a group to use sudo passwordlessly for specific commands only (e.g., /etc/init.d/apache2), run the following.