[Bug 936762] Re: setuplxc jams if your shell is not bash
Martin Pool
mbp at canonical.com
Mon Feb 20 08:37:21 UTC 2012
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....
** Also affects: lxc (Ubuntu)
Importance: Undecided
Status: New
** Summary changed:
- setuplxc jams if your shell is not bash
+ lxc-ubuntu template sets user shell, without checking it's installed
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/936762
Title:
lxc-ubuntu template sets user shell, without checking it's installed
To manage notifications about this bug go to:
https://bugs.launchpad.net/launchpad/+bug/936762/+subscriptions
More information about the Ubuntu-server-bugs
mailing list