To set sudo
without asking for a password:
<username>
= your user name
Run as root:
visudo -f /etc/sudoers.d/<username>
Write:
<username> ALL=(ALL) NOPASSWD: ALL
Save & restart console.
One command:
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER