User in admin group still being prompted for password to sudo

You will always be prompted for a password unless you have the NOPASSWD option set in the sudoers file for any given entry (ignoring the grace period the password is remembered and hence not prompted, default 15 minutes).

For example, to make all members of the sudo group to have passwordless sudo implementation:

%sudo   ALL=(ALL:ALL) NOPASSWD: ALL 

This indicates any member of the sudo group can run any command starting with sudo without prompting for password.

Similarly for user foobar to run the command reboot:

foobar ALL=(ALL:ALL) NOPASSWD: /sbin/reboot

Note that, it is not a good idea to have passwordless sudo access for all commands unless you have a very good reason, you should consider restricting the commands to a necessary minimum.


The sudo rules can also be defined in files under the /etc/sudoers.d/ directory, default /etc/sudoers file contains:

includedir /etc/sudoers.d

at the end, this makes any file that does not contain . or ends in ~ to be read for sudo rules. Presumably the definitions for user ubuntu defined in any of the files under the /etc/sudoes.d/ directory.