I'm having trouble with users in a chroot under Debian GNU/Linux.
I have created a chroot for the stable distribution using debootstrap.
I enter the chroot by using the following script
#!/bin/sh -v mount proc /debian-new/proc -t proc mount sysfs /debian-new/sys -t sysfs mount --bind /dev /debian-new/dev mount --make-rslave /debian-new/sys mount --bind /dev/pts /debian-new/dev/pts mount --rbind /dev /debian-new/dev mount --make-rslave /debian-new/dev chroot debian-new /bin/bash
I've copied the files /etc/password /etc/shadow /etc/group from the main system in my chroot
But when trying to change to an unprivilaged user I get:
# su pablo Cannot execute /bin/bash: Permission denied
(inside the chroot)
Also apt-get install prints this warning message
W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/libpython2.7-minimal_2.7.13-2+deb9u2_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Please help me!