Use sudo without inputting a password
If you want to still be able to use sudo commands, but never want to input your password, then run this command in your shell.
echo "%${USER} ALL=(ALL) NOPASSWD:ALL" | sudo EDITOR='tee ' visudo --quiet --file=/etc/sudoers.d/passwordless-sudo
Keep in mind that this can have security complications, as now a user can get root access to your WSL distro using your user account.
- More from this author:
- craigaloewen
- craigloewen-msft
- Website