Commit Graph

6 Commits

Author SHA1 Message Date
Jeremy Cline
ef26ebb240
oobe: don't append the user section to /etc/wsl.conf
Doing this apparently[0] breaks using `wsl --manage <distro>
--set-default-user` (in my test, wsl says it completed successfully, but
actually doesn't do anything at all). Since we set the default UID in
wsl-distribution.conf, the default default user will be UID 1000, which
we expect to create anyway.

While it's nice to support old versions of WSL, I think it's also
reasonable to require users to update to ensure things work. For
example, most things in Fedora expect cgroups v2, but WSL only removed
cgroups v1 in 2.5.

If users report an issue and note they're not using the latest WSL
stable release I'm just going to tell them to reproduce it on the
latest, and if they can't I'm not going to spend any time trying to make
it work.

[0] https://github.com/microsoft/WSL/pull/13094#issuecomment-2971990351

Signed-off-by: Jeremy Cline <jeremycline@linux.microsoft.com>
2025-07-07 09:44:57 -04:00
Simon de Vlieger
fc30a377e8
oobe: wait for cloud-init to finish
Let's wait for `cloud-init` to finish before we exit the OOBE; this
ensures that any potential user has been created. In the future we might
want to always continue with our OOBE, in those cases that `cloud-init`
didn't create a user we can then continue with the prompt(s).

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-18 21:52:05 +02:00
Simon de Vlieger
3ee41192ed
oobe: message for enabled cloud-init
Show a message when cloud-init is enabled so users know what is going
on.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-05 16:50:38 +02:00
Simon de Vlieger
5afaf63d99
oobe: exit early for cloud-init
WSL supports `cloud-init` for provisioning. In some cases (RHEL) this is
enabled. If `wsl-setup` is used on RHEL then there's a TOCTOU between
the check for "no user exists" and the "create user" part as
`cloud-init` creates the user during the prompt.

Let's exit early and assume everything is handled by `cloud-init` *if*
it is enabled.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-28 12:01:25 +02:00
Jeremy Cline
aae108edd0
oobe: Let the user know they're in wheel and have passwordless sudo
Also include the command to set a password, if they wish.
2025-02-18 10:24:26 -05:00
Jeremy Cline
7fee63c813
Initial import (rhbz #2342289) 2025-01-27 13:42:03 -05:00