SSH Chroot problems
Having multiple issues with a Chroot im trying to setup.
- When logging in, the users name shows up as "I have no name!". The
etc/passwdfile is present and accessible by the chroot user, along with
- The backspace key works at removing a character, but shows up in the terminal as whitespace. terminfo files and symbolic links all seem to be fine, as well as the
- When trying to open nano, the error: "Error opening terminal: xterm-256color" is given.
I’ve given all files 755 permission for testing, and the user seems to be put into their home directory fine.
The logs for sshd have an error that reads:
error: /dev/pts/1: No such file or directory. As far as i can tell,
/dev/pts/ptmx both exist.
Can anyone tell me what might be the problem?
/etc/passwd lookup is typically implemented by glibc using an additional library module, typically named something like
libnss_files.so.2. That library is not mentioned in
ldd outputs, because glibc decides whether to load it or not based on contents of the
Is such a library available within the chroot?
2.) The session might be in a state of "not really having a TTY/PTY device". In that situation, normal TTY input processing does not apply, but your terminal emulator does not get to know that and will behave as if it still does in some respects.
Does the chrooted session have the correct
stty settings? Check with
stty -a. This might also be related to
/dev/pts/1 being reported as missing. Note that
/dev/pts is not a normal directory, but a mount point for a special
devpts virtual filesystem that manages the creation and deletion of
/dev/pts/[0-9]* nodes on demand according to the applications requesting PTY devices via
/usr/share/terminfo/x/xterm-256color exist within the chroot? Is it readable? Are all directories leading to it accessible (= the
x permission bit for directories) by the chrooted user?
This error might also be related to item 2.), if
nano is displaying the same error message for multiple TTY access error conditions.