WSL: Error: 0x80040305

  • Your Windows build number: 10.0.17604.1000

  • What you’re doing and what’s happening: I noticed that my default user had changed to root (I don’t remember if I had done that or if I had just never noticed it before. I ran cut -d: -f1 /etc/passwd to get a list of all users and saw “bryce” at the bottom. I wanted my user to be “bthedestroyer” so I ran usermod -l bthedestroyer bryce and checked /etc/passwd again to find it changed. I then closed ubuntu and ran ubuntu config --default-user bthedestroyer from the command line and got a confirmation message, but when I went back in I was still root. I then restarted my computer and when I tried to run ubuntu this time, I get the error 0x80040305 and it instantly closes. I tried changing the default user back to root hoping that’d fix the issue but now I get Failed to set default user to: root

  • What’s wrong / what should be happening instead: I should be able to open Ubuntu or at least change the user back to root.

lxcore_kernel.zip

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

The change is in our init daemon which is closed-source, maybe someday we can open it up. I can describe the change at a high level though:

1. Call getpwuid for default UID, if success goto 4
2. Call getpwuid for root UID, if success goto 4
3. Initialize a default passwd structure with some sane defaults (root, /bin/sh, etc).
4. Launch shell from passwd structure

I think we should relax this error path

That or add a --userspec commandline parameter. Which gets you another step closer.