You are not logged in.
Hiya,
I've got a funny issue with Arch LXC containers, and I can replicate it on many systems,
It seems lxc-attach fails to find the shell assigned to the root account specifically only on Arch containers, and so falls back on /bin/sh
Debian/Ubuntu/CentOS containers have no issue launching whatever shell is assigned to the user and using it,
Steps to reproduce
lxc-create -n playtime -t download -- --dist archlinux --release current --arch amd64
lxc-start playtime
lxc-attach playtime
lxc-create -n playtime2 -t download -- --dist ubuntu --release focal --arch amd64
lxc-start playtime2
lxc-attach playtime2
Offline
Offline
It's not a failure to login, it's the fact that it's launching bash via /bin/sh rather than via /bin/bash.
Offline
https://github.com/lxc/lxc/blob/master/ … ch.c#L1891
This line is the one where it falls back to /bin/sh, so for some reason it fails to get the passwd entry
Offline
The code has a lot of useful comments - assuming "incompatible nss implementations", what's the output of "getent passwd 0" in the container?
I can replicate it on many systems
Including an archlinux host?
Edit: also check the container log - maybe some ofthe warnings are there…
Last edited by seth (2022-11-18 21:14:13)
Offline
Hmm it works using my Arch laptop as a host,
Output of getent passwd 0 in the container is the same between the proxmox host and the arch host
"root:x:0:0::/root:/bin/bash"
Offline