I am using the latest snap version of LXD at the time of this writing on Ubuntu 18.04. I decided to customize the base
ubuntu:lts container in order to install several packages and rename the default (
ubuntu) user to
ansible, remove its password, insert an
.ssh/authorized_keys and such.
After my customizations I stop the container and then simply use
lxc publish to generate an image that is “detached” from the upstream one (this is the intention here, btw).
However, if I then create a new container based on said customized image it creates a new user named
ubuntu which then just happens to have the UID 1001 with an accompanying group of the same name and GID.
How can I suppress this behavior?
Actually what I am interested in is where this behavior originates and how to adjust that. My guess is that it has something to to with
cloud-init or some hook that runs when
lxc launch happens …