I think that the easiest way is to run passwd chrooted to the container's root.
e.g. for the squeezie host created by the squeeze template
# chroot /var/lib/lxc/squeezie/rootfs/ passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Change a container's root password from the host