Digging in to this a bit, I think the bug can be said to be in the lxc templates, where lxc-ubuntu has
do_bindhome() { rootfs=$1 user=$2
# copy /etc/passwd, /etc/shadow, and /etc/group entries into container pwd=`getent passwd $user` if [ $? -ne 0 ]; then echo 'Warning: failed to copy password entry for $user' return else echo $pwd >> $rootfs/etc/passwd fi shad=`getent shadow $user` echo $shad >> $rootfs/etc/shadow
# bind-mount the user's path into the container's /home h=`getent passwd $user | cut -d: -f 6` mkdir -p $rootfs/$h echo "$h $rootfs/$h none bind 0 0" >> $path/fstab }
so that copies the pwent, including the shell, with no consideration whether it will exist....
Digging in to this a bit, I think the bug can be said to be in the lxc templates, where lxc-ubuntu has
do_bindhome()
{
rootfs=$1
user=$2
# copy /etc/passwd, /etc/shadow, and /etc/group entries into container
pwd=`getent passwd $user`
if [ $? -ne 0 ]; then
echo 'Warning: failed to copy password entry for $user'
return
else
echo $pwd >> $rootfs/etc/passwd
fi
shad=`getent shadow $user`
echo $shad >> $rootfs/etc/shadow
# bind-mount the user's path into the container's /home
h=`getent passwd $user | cut -d: -f 6`
mkdir -p $rootfs/$h
echo "$h $rootfs/$h none bind 0 0" >> $path/fstab
}
so that copies the pwent, including the shell, with no consideration whether it will exist....