fleshwounded
6/14/2019 - 11:42 PM

Things to do after fresh Ubuntu Install

Nice one-liner to remove sudo prompts for the current user

sudo bash -c 'echo "$(logname) ALL=(ALL:ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)'

I think you could just do:

echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo env EDITOR="tee -a"

visudo, only visudo needs sudo after all (and even env won't be needed in the default configuration, IIRC). – muru Jun 27 '16 at 20:38