After installing a couple of Kali distros in WSL in Windows, I often bumped into below error messages when I was trying to use sudo as a non-root user:
Sorry, try again. Sorry, try again. sudo: 3 incorrect password attempts
Since this is an extremely anonying behavior, which seems to be typical only for the WSL version of Kali, I decided to use root as the default user and below is how I did it in Windows’ command line or Powershell.
kali config --default-user root
Also, another way to do this is to update your Windows Terminal’s profile like below:
wsl.exe -d kali-linux -u root`
Leave a Reply