sudo echo hi # This sudo is to accept the current password, so that it won't ask for password for next few minutes
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
To restore the default behavior of sudo asking for password just remove the /etc/sudoers.d/$USER
file