I have an Ubuntu distribution running on WSL. Every load, it opens my user lraj22 by default. Using an /etc/wsl.conf file, I set
[user]
default=
It still opens up my user profile. If I set it to root, it opens the root profile, and if I set it to some non-existent user notarealuser, it errors and goes back to mine.
If it's possible, how do I disable the auto-login feature on WSL distributions (specifically Ubuntu)?
Note: For reference, the question How to set default user for manually installed WSL distro? shows how to set the default user. I'm trying to unset the default user, so that it asks for a username/password in order to access the system.
rootform). While I can probably give you a way to force a login, it wouldn't change the security aspects. But if you have a different reason for wanting to change it, maybe there's a workaround. Thanks! – NotTheDr01ds Dec 11 '22 at 00:51/etc/gdm/custom.conffile from Google searches didn't apply to WSL. When I finally found out aboutwsl.conf, it didn't work either, so I asked here on SU. I didn't expect this to increase security, but rather free me from constant user switching (apparentlysuisn't the equivalent to sign out & sign in on Windows... you canexitto go back, and commands are logged as the invoking user). – Lakshya Raj Dec 11 '22 at 01:48