I am trying to do a chroot as a certain user. For one user it works, for other users it does not, and I have no idea what is going on.
/etc/passwd in the chroot directory looks like this (relevant part):
sudo chroot --userspec=test0 chroot_dir/ /bin/bash --loginworks well
sudo chroot --userspec=test1 chroot_dir/ /bin/bash --loginsays
chroot: failed to run command ‘/bin/bash’: Permission denied
- details of
-rwxr-xr-x 1 user user 455188 Sep 19 08:58, where
useris my username in the system.
Any ideas why user
test1 does not work? If you need any more information, just please ask, I will put them in. Thanks a lot in advance.