Hi All,
I have tried using Jailkit version 'jailkit-2.15.tar.gz' on Ubuntu as well as SuSE 11.
I am trying to configure this machine as SFTP server where users can login to the Jail and add/del files to it.
On both the machines, I am not able to login to the jail with the jail users created.
I have followed below set of commands to install and configure Jailkit
- cd /opt
- sudo gunzip jailkit-2.15.tar.gz
- sudo tar -xvf jailkit-2.15.tar
- cd jailkit-2.15
- sudo ./configure
- cat INSTALL.txt
- sudo make
- sudo make install
- sudo cp extra/jailkit /etc/init.d/jailkit
- sudo chmod a+x /etc/init.d/jailkit
- sudo jk_init -j /opt/sftpjail jk_lsh
- sudo jk_init -j /opt/sftpjail sftp
- sudo jk_init -j /opt/sftpjail scp
- sudo useradd test
- sudo jk_jailuser -m -j /opt/sftpjail test
- sudo killall jk_socketd
- sudo jk_socketd
I then tried to login locally using below command
sftp address@hidden
Connecting to localhost...
address@hidden's password:
Connection closed
Content from jk_lsh.ini
susepc1 etc/jailkit> pwd
/opt/sshd-sftp-chroot/etc/sftpjail
susepc1 etc/jailkit> cat jk_lsh.ini
## example for a user
#[test]
paths= /usr/bin, /usr/lib/
executables= /usr/bin/scp, /usr/lib/sftp-server
#allow_word_expansion = 0
#umask = 002
#
##example for a group, there should be only 1 space inbetween the words!
#[group users]
#paths = /usr/bin
#executables = /usr/bin/cvs
#allow_word_expansion = 0
#environment= HELIX_PATH=/opt/RealPlayer/, TMP=/tmp/
The error I see is in /var/log/warn
jk_lsh[6961]: did
neither find a section 'test', nor 'group users' nor 'DEFAULT' in configfile
/etc/jailkit/jk_lsh.ini
I tried to google out a lot to figure out the issue. However it went in vain.
Not sure, why Jain user 'test' is not able to sftp to the Jail?
Can you help. I am not able to figure out the issue.
Thanks in advance
Regards
Aravind