Sometimes you may forget the root password, or for some reason were not provided one at the time you created the container.
This is not an issue, you can reset the root password but locating the directory where the container is placed.
Replace <mycontainer> with your container name:
# cd /var/lib/lxc/<mycontainer>Now we chroot to this container so we can use the binaries associated with it:
# chroot rootfs/Once we have done this, run the passwd command to reset the root password:
# passwd