1

I don't exactly know what I did wrong, but now every command that needs sudo returns:

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I found a bunch of answers for fixing this in these situations:

  • If I was running Linux and could boot with a live USB
  • If I was running Mac OSx.

But I'm running WSL2 in Windows 10, so these answers didn't helped me.

Have I rendered my WSL useless? Is there a way to fix this windows-side?

Things I've tried in WSL terminal (Ubuntu 20):

pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
pkexec visudo

Both gives me Error getting authority: Error initializing authority: Could not connect: No such file or directory response.

I've also tried su - root, but I put my password and it gives me Authentication failure.

Let's suppose this has no answer and I need to reset my Ubuntu WLS install. Is there a way to export everything that I did, installed and all, or will I have to start ALL over?

Thanks a lot.

  • Whoa, @Terrance , this did it for me. I can't believe I didn't find this before. Want to answer below so I can mark it as right answer? – Angelo Dias Jun 21 '20 at 03:29

0 Answers0