What are root and Ubuntu password in LXC ubuntu:16.04 container?
I created a Ubuntu container
lxc launch ubuntu images:ubuntu/xenial mycontainer
I can access the container using
lxc exec mycontainer bash
I found mysel logged in as root without asking any password
I see that there is a "ubuntu" user defined
How can I access a software installed in the container (e.g. webmin) which asks for a username and password?
What are the default passwords?
Solution 1:
After creating container "first" need set password for user "ubuntu"
lxc exec first -- /bin/bash
passwd ubuntu
exit
Then you can attach to console(or ssh - if ssh installed and configured)
lxc console first
UPDATE: As Piter wrote "You don't even have to enter the bash-shell"
lxc exec first -- passwd ubuntu
Solution 2:
The usual password for these kinds of things is: ubuntu
with the username ubuntu
You may need to set the password using the command passwd
(https://stackoverflow.com/questions/9596108/how-do-i-change-my-password-in-linux)
Hopefully this helps!