WSL: Creating UNIX user failed - 0x80070040

Bash on Windows seems to fail for me when creating a UNIX user account. I have tried lxrun /uninstall /full and reinstalling to no avail. Have run in command prompt (Administrator) and otherwise.

C:\WINDOWS\system32>bash
-- Beta feature --
This will install Ubuntu on Windows, distributed by Canonical
and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Windows Store... 100%
Extracting the filesystem, this will take a few minutes...
Installation successful!
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: nhardy
Creating UNIX user failed, this can be done later by running lxrun.exe /setdefaultuser
The environment will start momentarily...
Documentation is available at: https://aka.ms/wsldocs
Error: 0x80070040

C:\WINDOWS\system32>lxrun.exe /setdefaultuser
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: nhardy
Error: 0x80070040

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

@nhardy Ok I consulted with some people and figured out the right way to have you send us logging. If you could do the below it would be extremely helpful to us:

  1. Download the below two .txt files and rename them .cmd
  2. Run start_lxcore_trace.cmd from an admin command prompt
  3. Launch bash.exe
  4. Wait until you see the error 0x80070040 error.
  5. Run stop_lxcore_trace.cmd from an admin command prompt
  6. You should now see three .etl files in the directory you ran the script from.
  7. Email the logs to: InsiderSupport@microsoft.com. Include in the subject / message to forward to the WSL team. In the body of the email mention it is for russalex and benhill. Also kindly include the build number you’re running.

If you need a hand with any of the above let me know, I’m very interested in looking at the logs to see what’s wrong. Thanks!

start_lxcore_trace.txt stop_lxcore_trace.txt