Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st February 2013, 15:30
DaWy DaWy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default jailkit - Activate jailkit user can't login

Hi guys! I've just installed ISPConfig with one OVH Dedicated Servers. (self install)

I've fallen in love with ISPConfig, its just amazing... but there's one thing I cant make it work (Sorry for my horrible english)

When I create a new ssh user for one website folder, I can connect with it without the jailkit enabled (so chroot option is "none"), but if I enable the option to "jailkit" the user can't login (it logins but insta kick him).

This is the log from the /var/log/auth.log when user's connect:


Code:
Feb  1 14:22:28 ks3266342 sshd[6088]: Accepted password for test from 88.1.35.95 port 57056 ssh2
Feb  1 14:22:28 ks3266342 sshd[6088]: pam_unix(sshd:session): session opened for user test by (uid=0)
Feb  1 14:22:29 ks3266342 jk_chrootsh[6095]: now entering jail /var/www/clients/client1/web2 for user test (5006) with arguments
Feb  1 14:22:29 ks3266342 jk_chrootsh[6095]: abort, failed to find user 5006 in /var/www/clients/client1/web2/etc/passwd
Feb  1 14:22:30 ks3266342 sshd[6088]: pam_unix(sshd:session): session closed for user test
The file that it says that does not exists (/var/www/clients/client1/web2/etc/passwd)ofc it exists. Here it comes:

Code:
root:x:0:0:root:/root:/bin/bash
test:x:5006:5006:::/bin/bash
So whats the problem? I've updated jailkit to the last version (2.5) still not working.

Im sure jailkit is working, cuz if I remove the jailkit option in the chroot option on user edit, the user can login, but then he can browser all the path's... so thats not viable ofc.

My brain is starting to became black mat...

Anyone can help with this? thnx in advance!!!
Reply With Quote
Sponsored Links
  #2  
Old 1st February 2013, 15:35
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,005
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

Which ispconfig version do you use?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 1st February 2013, 15:36
DaWy DaWy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default

oops! I forget to write that...

Im using last stable ver. ISPConfig 3.0.4.6

Thanks for the answer!

EDIT: Thanks for the very fast answer!!!!!
Reply With Quote
  #4  
Old 1st February 2013, 15:40
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,005
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

Ok.Jailkit should work there. What makes me wonder is that the path to the home directory is missing in the line:

test:x:5006:5006:::/bin/bash

Please check if "Jailkit chroot home" under System > server config > jailkit is set to:

/home/[username]
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 1st February 2013, 15:47
DaWy DaWy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default

Yes it is. I've just checked the server conf, and the jalkit chroot folder is set to: /home/[username]

Maybe its cuz I've updated manually the jailkit to 2.5? Dunno...
Reply With Quote
  #6  
Old 1st February 2013, 15:49
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,005
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

Ok. Please post the line from /etc/passwd for this username.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 1st February 2013, 16:04
DaWy DaWy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
Ok. Please post the line from /etc/passwd for this username.
This is the line where user "test" appears at /etc/passwd:

Code:
test:x:5006:5006::/var/www/clients/client1/web2/./home/test:/usr/sbin/jk_chrootsh
Reply With Quote
  #8  
Old 1st February 2013, 16:24
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,005
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

Thats ok as well. I just cjecjed a working jailkit user on ym server and I was wrong with my post above that the path is missing in the "test:x:5006:5006:::/bin/bash" line, I dont have that path in my working paswd file as well.

May you please try to delete the ssh user in ispconfig, then create it again as jailed user to see if this fixes it.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 4th February 2013, 12:29
DaWy DaWy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
Thats ok as well. I just cjecjed a working jailkit user on ym server and I was wrong with my post above that the path is missing in the "test:x:5006:5006:::/bin/bash" line, I dont have that path in my working paswd file as well.

May you please try to delete the ssh user in ispconfig, then create it again as jailed user to see if this fixes it.
I deleted the test user and created one more. Its happening the same...
Reply With Quote
  #10  
Old 4th February 2013, 13:22
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,005
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
 
Default

Maybe it is realy a issue with jailkit 2.15 then. I havent tested this jailkit release with ispconfig yet.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
chroot, jailkit, passwd

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
MySQL Error Nolan Installation/Configuration 13 27th November 2014 06:04
Jailkit user cannot login wwweiss Installation/Configuration 5 29th January 2013 18:07
ISPConfig3 won't start after update Cracklefish Installation/Configuration 15 28th February 2012 15:11
Some problems and questions Typhon Installation/Configuration 22 15th January 2012 15:12
Jailkit SSH user login fails outeredge General 7 21st February 2011 15:40


All times are GMT +2. The time now is 10:21.


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