lima-vm / lima-vm/lima

Alpine instance with alpine user doesn't load /etc/environment in ssh sessions on first boot

Open
#2,879 0 comments 0 reactions 0 assignees View on GitHub
guest/alpine
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

This issue only affects the `alpine` template when using an `alpine` user name:

```
shell start --set '.user.name="alpine"' template://alpine
```

It does not affect the `alpine-iso` template.

The `/etc/environment` is loaded in ssh session after a reboot of the instance.

This also explains why this doesn't happen for any other user name except for `alpine`: in that case the `00-alpine-user-group.sh` boot script will delete the `alpine` user created by cloud-init and reboot the instance.

Restarting the `sshd` service does not make a difference; it requires a reboot to fix itself.

Note: `/etc/environment` is loaded via PAM, but I couldn't find anything to force a reload.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.