Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th June 2013, 15:25
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default Cannot execute /usr/sbin/jk_chrootsh: No such file or directory

I enabled Jailkit when I created the user under "Chroot Shell"

When I try to login to the account, it returns an error:

Code:
root@philartist:/home/ubuntu# su - rolanit
Cannot execute /usr/sbin/jk_chrootsh: No such file or directory
I have followed everything from the tutorial at http://www.howtoforge.com/perfect-se...ot-ispconfig-3.

Anyone know how to fix this?
Reply With Quote
Sponsored Links
  #2  
Old 14th June 2013, 15:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

jailkit seems to be not installed. Please redo the jailkit installation steps from the tutorial.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 14th June 2013, 15:59
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

I reinstalled it again but now nothing happens when I login:

Code:
root@philartist:/home# su - rolanit
root@philartist:/home#
Quote:
Originally Posted by till View Post
jailkit seems to be not installed. Please redo the jailkit installation steps from the tutorial.
Reply With Quote
  #4  
Old 14th June 2013, 16:00
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

You have to login from external with ssh. Beside that, the jail is most likely broken as jailkit was not installed correctly at the time you created the website, so it might be nescssary to delete the website in ispconfig and then create the site and ssh user again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 14th June 2013, 16:14
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have already deleted the website. But still the user can browse outside his directory.

Quote:
Originally Posted by till View Post
You have to login from external with ssh. Beside that, the jail is most likely broken as jailkit was not installed correctly at the time you created the website, so it might be nescssary to delete the website in ispconfig and then create the site and ssh user again.
Reply With Quote
  #6  
Old 14th June 2013, 17:23
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have also noticed, that there's no directory created under /home. Supposed to be it should /home/rolanit. As the configuration of jailkit under "Jailkit chroot home" the value is /home/[username].

I'm wondering also because when I login to the chrooted account, I was redirected to /var/www/clients/client1/web1, which is correct. But why the value of "Jailkit chroot home" is "/home/[username".


Quote:
Originally Posted by till View Post
You have to login from external with ssh. Beside that, the jail is most likely broken as jailkit was not installed correctly at the time you created the website, so it might be nescssary to delete the website in ispconfig and then create the site and ssh user again.
Reply With Quote
  #7  
Old 14th June 2013, 17:33
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

I just found out that I cannot see the directory of other users, but including the files of the logged in user. When I logged in, I was redirected to /home/rolanit. And I can't find any files in there.
Reply With Quote
  #8  
Old 19th June 2013, 15:00
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

I still can't make chroot work on my system. I can still browse outside the directory that the use is belong to. Supposedly if the shell-user's home is at /var/www/clients/client1/web1, he/she cannot go outside this directory.

How can I do this?

I'm using ubuntu 12.04 using nginx as what I have followed in this tutorial:
http://www.howtoforge.com/perfect-se...ispconfig-3-p5
Reply With Quote
  #9  
Old 19th June 2013, 15:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

Are you sure that you can go outside of this directory? In the jail, there are copies of directories like /home and /usr, so the jail looks very similar to a real / directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 19th June 2013, 15:23
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
 
Default

Look in your /etc/passwd file and find out what shell the web user is loading - somewhere near the end, it should say something along the lines of:

Code:
web31:x:5004:5006::/path/to/clients/client27/web31/./home/shellusername:/usr/sbin/jk_chrootsh
The key part there is the last bit /usr/sbin/jk_chrootsh which dictates what shell the user is presented with when they login. If it's not setup correctly, it will probably say /bin/bash or similar which basically means it's loading the normal unrestricted shell.

Regarding the "Jailkit Chroot Home" folder, I think that is the home folder INSIDE the chroot jail that the shell user will be taken to when they first login.

Also, turn on debugging then delete and recreate the client, the website, and the shell user. Then look in the logs and see if there are any errors when creating the jail.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPconfig 3 Bastille Firewall sheshes Installation/Configuration 1 27th March 2013 17:26
Can't receive mails baicunko Server Operation 12 3rd August 2011 22:02
add web site serr57 Installation/Configuration 18 13th April 2008 11:40
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 03:40
setup fails on debian 3.1 dtrumbower Installation/Configuration 7 7th March 2006 13:42


All times are GMT +2. The time now is 12:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.