Lxd Demo server Non Root access

lxc
lxd

(Najib Nour) #1

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.


(Najib Nour) #2

@stgraber


(Stéphane Graber) #3
command: ["sudo", "--login", "--user", "ubuntu"]

This might work


(Najib Nour) #4

Yes it does!!!
Shorter version:

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