HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   jailkit - Activate jailkit user can't login (http://www.howtoforge.com/forums/showthread.php?t=60401)

DaWy 1st February 2013 14:30

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!!!

till 1st February 2013 14:35

Which ispconfig version do you use?

DaWy 1st February 2013 14:36

oops! I forget to write that... :D

Im using last stable ver. ISPConfig 3.0.4.6

Thanks for the answer!

EDIT: Thanks for the very fast answer!!!!!

till 1st February 2013 14:40

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]

DaWy 1st February 2013 14:47

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...

till 1st February 2013 14:49

Ok. Please post the line from /etc/passwd for this username.

DaWy 1st February 2013 15:04

Quote:

Originally Posted by till (Post 291434)
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

till 1st February 2013 15:24

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.

DaWy 4th February 2013 11:29

Quote:

Originally Posted by till (Post 291438)
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... :(

till 4th February 2013 12:22

Maybe it is realy a issue with jailkit 2.15 then. I havent tested this jailkit release with ispconfig yet.


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

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