Lxd Demo server Non Root access

,

Hello, I am trying to configure the lxd demo server to not spawn in as root. Within the lxd-demo.yaml config file, I do see an option,

#Command to spawn in the container
command: [“bash”]

I have tried different choices other than bash like “-- su ubuntu” but still had no luck spawning into the container. Any guidance on what the demo server will accept to have a regular user spawn?

Thanks.

@stgraber

command: ["sudo", "--login", "--user", "ubuntu"]

This might work

Yes it does!!!
Shorter version:

command: ["su", "--login", "ubuntu"]