You are not logged in.
I setup a ssh chroot jail according to this guide. It works as advertised with two exceptions:
1) The backspace key actually moves the cursor forward and does not delete what I type.
2) Logging in doesn't trigger an automatic sourcing of /.bashrc (which I copied from /etc/skel) or of /etc/inputrc. What am I missing?
Here is the chroot jail:
% tree -a /var/jail
/var/jail
├── .bashrc
├── bin -> usr/bin
├── dev
│ ├── null
│ ├── random
│ ├── tty
│ └── zero
├── etc
│ ├── group
│ ├── inputrc
│ └── passwd
├── lib -> usr/lib
├── lib64 -> usr/lib64
└── usr
├── bin
│ ├── bash
│ ├── ls
│ ├── scp
├── lib
│ ├── libcap.so.2
│ ├── libc.so.6
│ ├── libdl.so.2
│ ├── libncursesw.so.6
│ ├── libnss3.so
│ ├── libnssckbi-p11-kit.so
│ ├── libnssckbi.so
│ ├── libnss_compat-2.23.so
│ ├── libnss_compat.so
│ ├── libnss_compat.so.2
│ ├── libnss_db-2.23.so
│ ├── libnssdbm3.chk
│ ├── libnssdbm3.so
│ ├── libnss_db.so
│ ├── libnss_db.so.2
│ ├── libnss_dns-2.23.so
│ ├── libnss_dns.so
│ ├── libnss_dns.so.2
│ ├── libnss_files-2.23.so
│ ├── libnss_files.so
│ ├── libnss_files.so.2
│ ├── libnss_hesiod-2.23.so
│ ├── libnss_hesiod.so
│ ├── libnss_hesiod.so.2
│ ├── libnss_myhostname.so.2
│ ├── libnss_mymachines.so.2
│ ├── libnss_nis-2.23.so
│ ├── libnss_nisplus-2.23.so
│ ├── libnss_nisplus.so
│ ├── libnss_nisplus.so.2
│ ├── libnss_nis.so
│ ├── libnss_nis.so.2
│ ├── libnss_resolve.so.2
│ ├── libnsssysinit.so
│ ├── libnssutil3.so
│ ├── libnss_winbind.so
│ ├── libnss_winbind.so.2
│ ├── libnss_wins.so
│ ├── libnss_wins.so.2
│ └── libreadline.so.6
└── lib64
└── ld-linux-x86-64.so.2
Last edited by graysky (2016-04-19 21:56:12)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I have never done something like this, so it is just a guess, check if adding /etc/shells to the chroot helps it to work.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
@Rookie - No effect... I did solve #2 by editing /etc/profile (within the chroot) to read:
# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /.bashrc; then
. /.bashrc
fi
I still cannot figure out the backspace issue
EDIT: From what I think I'm learning, readline does this... what component of readline might I require (to manually copy into the chroot jail)?
Last edited by graysky (2016-04-19 21:56:58)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I might be misleading you so take this with a few grains of salt. I see you have included something related to ncurses (libncursesw.so.6) but you don't include any files from '/usr/share/terminfo'.
Maybe one of those files is needed and if not found things will not work correctly. Regarding readline, no ideas here.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline