WSL icon indicating copy to clipboard operation
WSL copied to clipboard

After installing Ubuntu18.04, you are prompted for a username, which is invalid

Open CasterWx opened this issue 6 years ago • 9 comments

Microsoft Windows [Version10.0.19628.1]

WSL 2

After installing Ubuntu18.04, you are prompted for a username, which is invalid。

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: antzuhl
Enter new UNIX username: abcsdasd
Enter new UNIX username: wangssds
Enter new UNIX username: fdfdas

CasterWx avatar May 21 '20 10:05 CasterWx

Make sure you have this option in Settings -> System -> Storage pointing to the C: system drive. You may need to uninstall the distro and install it again.

Annotation 2020-05-21 132709

onomatopellan avatar May 21 '20 11:05 onomatopellan

There are these options.

It was unloaded and reloaded many times, There is no problem with the WSL. However, after converting to WSL2, problems arise.

wsl --set-version Ubuntu-18.04 2

CasterWx avatar May 21 '20 12:05 CasterWx

Is that Windows Chinese version? You have same problem as #4900

Try this from cmd: wsl.exe -d Ubuntu-18.04 -u root

and from bash: adduser antzuhl usermod -aG adm,cdrom,sudo,dip,plugdev antzuhl

onomatopellan avatar May 21 '20 12:05 onomatopellan

It worked, thanks!!

CasterWx avatar May 21 '20 13:05 CasterWx

People seeing this might file an issue with the disto maintainer similar #3273 (message).

therealkenc avatar May 21 '20 16:05 therealkenc

hi, I can not follow, how was this fixed ? I am getting same issues with all distros WSL2 on Azure VM. Content is saved to C: where I have full access to.
wsl.exe -d Ubuntu-18.04 -u root even this didn't work. Whats the work around ? , thanks

naren3k avatar Feb 14 '22 20:02 naren3k

@naren3k What's the Windows version in the Azure VM? What's your output for wsl.exe -l -v and wsl.exe --status ?

onomatopellan avatar Feb 14 '22 23:02 onomatopellan

I had the same problem on my laptop. Looks like it was blocked by McAfee, configured with company-wide antivirus policy. There's a message about that in McAfee Event Log: image So, need to contact guys who are in charge of that.

kavryn avatar Jun 09 '22 12:06 kavryn

Is that Windows Chinese version? You have same problem as #4900

Try this from cmd: wsl.exe -d Ubuntu-18.04 -u root

and from bash: adduser antzuhl usermod -aG adm,cdrom,sudo,dip,plugdev antzuhl

This worked for me, but for some reason with Ubuntu-20.04.6 i wasn't able to do that. Even wsl --list did not show anything. Im on win10 and Ubuntu-18.04 fits good.

addliam avatar Sep 04 '23 23:09 addliam