]> git.sommitrealweird.co.uk Git - lxc-debian-unprivileged.git/commitdiff
Change some pam stuff so that we can login
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 21 May 2016 22:26:00 +0000 (23:26 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 21 May 2016 22:26:00 +0000 (23:26 +0100)
templates/lxc-debian-unprivileged

index 5c5f0855891a347b5ed842e599824cde531f2bb8..bc6288b8eb69f9a14f24d9e998ca239448e007dd 100755 (executable)
@@ -118,7 +118,7 @@ chmod 755 ${LXC_PATH}/bin/mknod
 
 export PATH=${LXC_PATH}/bin:$PATH
 
 
 export PATH=${LXC_PATH}/bin:$PATH
 
-debootstrap --foreign --include debian-archive-keyring,ifupdown,isc-dhcp-client,locales $DEBIAN_RELEASE ${LXC_ROOTFS} $DEBIAN_MIRROR
+debootstrap --foreign --include debian-archive-keyring,ifupdown,isc-dhcp-client,locales,openssh-server $DEBIAN_RELEASE ${LXC_ROOTFS} $DEBIAN_MIRROR
 
 # now totally skip that check in the new root, because it sucks.
 sed -i -e 's#check_sane_mount () {#check_sane_mount () {\n\treturn 0#;' ${LXC_ROOTFS}/debootstrap/functions
 
 # now totally skip that check in the new root, because it sucks.
 sed -i -e 's#check_sane_mount () {#check_sane_mount () {\n\treturn 0#;' ${LXC_ROOTFS}/debootstrap/functions
@@ -188,6 +188,9 @@ if [ -e ${LXC_ROOTFS}/etc/network/interfaces.d ]; then
     NETWORK_FILE=/etc/network/interfaces.d/eth0
 fi
 
     NETWORK_FILE=/etc/network/interfaces.d/eth0
 fi
 
+# remove some interesting breakages in pam for unpriv foo
+sed -i -e 's#^\(session.*required.*pam_loginuid.so\)#\#\1#;' ${LXC_ROOTFS}/etc/pam.d/*
+
 # setup sources.list
 cat <<EOF > ${LXC_ROOTFS}/etc/apt/sources.list
 deb $DEBIAN_MIRROR $DEBIAN_RELEASE main
 # setup sources.list
 cat <<EOF > ${LXC_ROOTFS}/etc/apt/sources.list
 deb $DEBIAN_MIRROR $DEBIAN_RELEASE main