Skip to content

The user shell is not being set in the WSL2 setup script #3805

@afbjorklund

Description

@afbjorklund

Description

I think the line is just missing a -s "${LIMA_CIDATA_SHELL}", so it should be simple enough to fix:

sudo useradd -u "${LIMA_CIDATA_UID}" "${LIMA_CIDATA_USER}" -c "${LIMA_CIDATA_COMMENT}" -d "${LIMA_CIDATA_HOME}"

But it was different from cloud-config.yaml

I guess it would normally be set to /bin/sh

       -s, --shell SHELL
           sets the path to the user's login shell. Without this option, the system will use the SHELL variable
           specified in /etc/default/useradd, or, if that is as well not set, the field for the login shell in
           /etc/passwd remains empty.
# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
# Similar to DSHELL in adduser. However, we use "sh" here because
# useradd is a low level utility and should be as general
# as possible
SHELL=/bin/sh

The TimeZone also seems missing, but it's a separate issue.

Needs a variable, but then it should be just to set up TZ.

Any other features of cloud-config would also be missing...

This is because this setup script is duplicating cloud-init.

Metadata

Metadata

Assignees

No one assigned

    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