[lxc-users] Problem with CentOS download from images.linuxcontainers.org

Michael H. Warfield mhw at WittsEnd.com
Mon Apr 28 22:50:41 UTC 2014

On Mon, 2014-04-28 at 22:26 +0100, Matt Saunders wrote:
> Hi there,
> I'm enjoying using the lxc-download template to get slimmed down
> containers.  This works really well for me with the Ubuntu container.
> However, I'm having a problem with the CentOS 6 amd64 one at
> http://images.linuxcontainers.org/images/centos/6/amd64/default/20140426_02:16/
> The post-create message says "The default root password is: root" but I
> can't log in on the console with that password.  I have to edit
> /etc/shadow manually to get into the container but it'd be much easier
> to know what the password actually is.

Rather than editing /etc/shadow manually, the correct practice is to
either run:

chroot /var/lib/lxc/{Container}/rootfs password


echo root:${Password_Hash} | chroot /var/lib/lxc/{Container}/rootfs setpasswd -e

The later is safer (no password exposure and no static password), if
you're a security paranoid like I am, but more complicated.

> Can anyone help?

I see St├ęphane is saying he is fixing that in git.  Can't say I agree
with the practice of setting initial passwords to static values but the
download template is his.

> Thanks!
> Matt.
> -- 
>   Matt Saunders 
>   07506 857125
>   http://www.yoyo.org/matts/contacts/

Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140428/aa85fd86/attachment.sig>

More information about the lxc-users mailing list