Issue with jailkit and getting client to be able to ssh into my ISPConfig server.

Discussion in 'Installation/Configuration' started by ghall, Jan 26, 2015.

  1. ghall

    ghall Member

    I'm having an issue with jailkit and getting client to be able to ssh into my ISPConfig server.

    I am currently running an Ubuntu server using The Perfect Server - Ubuntu 14.04 (Apache2, PHP, MySQL, PureFTPD, BIND, Dovecot, ISPConfig 3) Tutiorial on an x64 Virtual Server.

    I've looked at: https://www.howtoforge.com/community/threads/problem-with-jailkit.66732/

    in my /etc/passwd it shows:

    web3:x:5006:5005::/var/www/clients/client1/web3:/bin/false
    web7:x:5009:5007::/var/www/clients/client2/web7:/bin/false
    web8:x:5010:5007::/var/www/clients/client2/web8:/bin/false
    web10:x:5011:5005::/var/www/clients/client1/web10:/bin/false
    avahi:x:115:124:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
    web11:x:5012:5007::/var/www/clients/client2/web11:/bin/false
    web12:x:5013:5007::/var/www/clients/client2/web12:/bin/false
    web13:x:5014:5007::/var/www/clients/client2/web13:/bin/false
    web14:x:5015:5007::/var/www/clients/client2/web14:/bin/false
    web15:x:5016:5010::/var/www/clients/client5/web15:/bin/false

    I'm not sure what jailkit entries look like in the Passwd file. Do these look ok?

    I have uninstalled jailkit, reinstalled IAC with the install guide, manually updated ISPConfig and reconfigured the services but I still fail to get clients to login via SSH

    I need comprehensive troubleshooting directions on how to fix this.
     
  2. ghall

    ghall Member

    After finding a possible solution @ https://www.howtoforge.com/community/threads/jailkit-problems.57185/ and RTFM about Jailkit @ http://olivier.sessink.nl/jailkit/
    I learn a few things. Since I am using a x64 system I had to edit /etc/jailkit/jk_init.ini to change all paths to my system's correct values. My first two sections looks like this now:

    Code:
    [uidbasics]
    comment = common files for all jails that need user/group information
    libraries = /lib/x86_64-linux-gnu/libnsl*, /lib/x86_64-linux-gnu/libnss*
    regularfiles = /etc/nsswitch.conf, /etc/ld.so.conf
    
    [netbasics]
    comment = common files for all jails that need any internet connectivity
    libraries = /lib/x86_64-linux-gnu/libnss*
    regularfiles = /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services
    I ran
    Code:
    jk_update -j /var/www/clients/clientx/webx
    But when I do I get the following errors:
    Code:
    root@web:~# jk_update -j /var/www/clients/client5/web15/
    ERROR:  while scannign dir /var/www/clients/client5/web15/bin/: No such file or directory
    ERROR:  while scannign dir /var/www/clients/client5/web15/lib/: No such file or directory
    ERROR:  while scannign dir /var/www/clients/client5/web15/usr/: No such file or directory
    ERROR:  while scannign dir /var/www/clients/client5/web15/opt/: No such file or directory
    root@web:~#
    
    Its true that these directories aren't in the /web15/ area.

    Does anyone have a fix for this?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that there is no jail yet, so nothing that can be updated. Delete the jailed shell user and create a new one. When jailkit is setup correctly now, then these directories will be created when the first jailed user of the site is added in ispconfig.
     

Share This Page