I'm switching this around a little bit from previous versions of this answer. I would suggest one of three approaches:
Recommended: make a group of users who can use
sudo without a password:
%wheel ALL = (ALL) NOPASSWD: ALL
and add all user accounts which people might use to this group.
Secure-ish but annoying: grant passwordless
sudo access to an explicit list of users:
User_Alias EVERYONE = user1, user2, user3, ...
EVERYONE ALL = (ALL) NOPASSWD: ALL
but you will have to edit the
sudo configuration each time you want to change which users have access.
Insecure: if you really want to give all user accounts passwordless sudo access, thanks to a comment by medina, you can write
ALL ALL = (ALL) NOPASSWD: ALL
In each case, the lines in the code block should be added to
/etc/sudoers (using the
visudo command, of course, which will ensure that you haven't made any syntax errors), or to a file under
/etc/sudoers.d if your system is set up to include those files in the
sudo configuration (thanks Xetius). Note that lines in the sudo configuration are processed in order from top to bottom and later ones override earlier ones, so if you want to avoid something else overriding this, you should put it toward the end (thanks a1an).
The reason I recommend using a group rather than granting blanket passwordless
sudo access to all users - even though I know that's what the question was asking for - is that, especially in the modern world, a significant security risk comes from compromise of other services running on the system. Sure, you might be able to totally trust all the real people who have access, but do you trust the mail server? The system logger? The Docker daemon? Whatever other services are running on the machine? And more to the point, do you trust whatever random person on the internet might have exploited a vulnerability in one of these services to make it do things? Giving passwordless
sudo access to all users means that anyone who hacks into one of those services in a way that lets them execute commands can jump right to running commands as root, which probably means total compromise of the system. It's true that denying them access to
sudo doesn't necessarily mean they can't compromise the system anyway, but you can at least make it harder for them.
Of course, different systems have different needs, and you might very well be in a situation where you really can trust that nobody will get the wrong kind of access to this computer, or that there is really nothing too bad anyone could do if they did. But at least stop to think about it. And when in doubt, it's better to limit access by default, because it sometimes turns out that you can't trust your system as much as you think you can, and if something does go wrong, it's going to be too late.