Skip to content

Default user stopped being respected (only on WSLv1 profiles, WSLv2 are okay) #10874

@vadimkantorov

Description

@vadimkantorov

Windows Version

Microsoft Windows [Version 10.0.22621.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Linux version 4.4.0-22621-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #2506-Microsoft Fri Jan 01 08:00:00 PST 2016

Other Software

No response

Repro Steps

On my machine I have both WSLv1 and WSLv2 distros and Terminal profiles.

For many years I had it somehow set up that WSLv1 profile in my Terminal logs me in as vadimkantorov by default. I just rebooted the laptop, and somehow WSLv1 logs me into as root. I created a /etc/wsl.conf with

[user]
default=vadimkantorov

but it did not help.

WSLv2 profiles still log me in as vadimkantorov correctly

The ubuntu.exe config --default-user vadimkantorov affects only WSLv2 as it appears

How can I fix my WSLv1 to log me in as vadimkantorov?


UPD: I just fixed it by appending --user vadimkantorov to my wsl.exe command line in Terminal config: https://superuser.com/a/1566031/813257, but it would still be nice to know how to fix it from within the distro, as /etc/wsl.conf appears to have no effect

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions