2

I'm trying to make a server that acts as sort of an access point for lots of other machines. I want to give one user jailed access to it so they can ssh to other machines in the network.

I've got the jail working alright with all the dependencies for ssh + bash.

All I'm getting when I try to run ssh is

-bash-3.2$ ssh
You don't exist, go away!

I've read that this is commonly because you don't have an /etc/group or /etc/passwd file, well I've got my user in there.

I've tried copying getent into the jail and running it, I get nothing in the database for users or groups. Also, I put id in the jail and it looked right too, so linux knows who I am, but ssh doesn't.

There doesn't appear to be anything logged about this is there any way for me to know what is or isn't happening.

  • you probably don't have passwd in chroot which causes this error. – Jakuje Aug 7 '15 at 19:24
  • @Jakuje yeah, that caused it too. – Peter Turner Aug 7 '15 at 19:27
3

You needed the "libnss*" files from the lib64 directories, lots of scripts on the internet haven't been updated to take this in to account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.