Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WSL session starts as root #270

Closed
tnguyen14 opened this issue Jan 21, 2021 · 4 comments
Closed

WSL session starts as root #270

tnguyen14 opened this issue Jan 21, 2021 · 4 comments

Comments

@tnguyen14
Copy link

When I opened wsltty, it starts a session as root.

I don't see this behavior when I open the default Ubuntu terminal, or Windows Terminal.

I have tried uninstalling and reinstalling wsltty, but the problem is still there.

What can I do to further debug this issue?

@mintty
Copy link
Owner

mintty commented Jan 21, 2021

It works here. No idea.

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 22, 2021

Hi @tnguyen14

  • Did you change default WSL user by any means, that is either with registry or with /etc/wsl.conf file?
  • If you just type wsl.exe in Command Prompt what will be the user?

Also if wslbridge2 is not executed with -u or --user option, it will never change WSL user.

@tnguyen14
Copy link
Author

Thanks @Biswa96. I tried all that you suggested, but nothing seemed odd.

Though I think I've sort of figured it out. wsltty created a bunch of different icons. I clicked WSL Terminal, which I think opened a different VM. If I clicked on Ubuntu 20.04 Terminal, it works fine.

I'm guessing the WSL Terminal is opening to docker-desktop

wsl.exe --list                                                                                       
Windows Subsystem for Linux Distributions:                                                                              
docker-desktop (Default)                                                                                                
docker-desktop-data                                                                                                     
Ubuntu-20.04        

@mintty
Copy link
Owner

mintty commented Jan 22, 2021

Interesting resolution of this issue. There had been reports about this scenario before, however, it's curious why in your case a WSL shell starts at all when running a Docker instance. Maybe Docker has changed to provide a shell?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants