Search code examples
authenticationwindows-10ubuntu-18.04windows-subsystem-for-linux

How to prompt user for username and password on start WSL Ubuntu


I am aware of functions to set a default user or change password for WSL Ubuntu like in askubuntu thread here or official docs.

What I'm looking for is when we do wsl from a cmd, or click the Ubuntu 18.04 LTS from Start Menu, I would like to have the same effect as when SSH into a server, it will ask for name or password. I do not want to automatically sign-in. I figured maybe all I need is to not set any default user, but couldn't find how to do that anywhere.

It seems to do this from a normal Ubuntu distro, I would have to edit it in the Settings > Detail or do it from terminal like here - but that's using gdm, I don't think WSL has that.


Solution

  • that is not possible in WSL. Although you can add users and switch between them.

    check this out for more info