you are trying to enter your server as a user privileges and you see /bin/bash
file. When you chroot
, you can reach /bin/bash
directroy. And you can add your user in sudo
.
Then you should see directory /home/username/bin/bash/
Edit :
When you chroot, the named directory becomes /
. The correct shell path inside the chroot is then /bin/bash
, not /home/username/bin/bash
.
You will also need to make sure there's enough other stuff inside the chroot for the system to work. You can test this with sudo chroot /home/username /bin/bash
and see what works and what doesn't
And also there is good information about chroot configuration