Default user lost after moving
thiagolopes-dev opened this issue · comments
what can it be, when moving wsl it goes only in root
print> https://prnt.sc/s0qzvc
@th14go Not sure if I understood correctly. After moving the distro your default user was lost and root used instead? You can set your default user with debian config --default-user USERNAME
. Does that fix it for you?
Apparently this is the normal behaviour of the wsl command. You can try setting your default user in wsl.conf like suggested here: microsoft/WSL#3974 (comment)
So I just tried this myself.
Add this to your /etc/wsl.conf
inside your distro:
[user]
default=YOUR_USERNAME
Then exit WSL, terminate your distro (wsl -t YOUR_DISTRO
) and start it again.
that's it buddy, it worked, with the command you gave (debian config --default-user USERNAME) . Perfect thank you @pxlrbt
screenshot > https://prnt.sc/s18dhk
@th14go You probably should set up wsl.conf. Does the same, but is more bulletproof.
@pxlrbt I understand, I already made this configuration as you said.