bugJailkit - Bugs: bug #28696, Jailkit Fails to work in Openvz

 
 

bug #28696: Jailkit Fails to work in Openvz

Submitted by:  Dan Rossi <electroteque>
Submitted on:  Wed 20 Jan 2010 02:05:48 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 21 Jan 2010 12:49:13 PM UTC, comment #6:

Yes I know its now working with the config I posted below, forgot I had to add it back in. So i needed skip_injail_passwd_check enabled afterall. you may close this. sorry about that.

Dan Rossi <electroteque>
Thu 21 Jan 2010 12:45:54 PM UTC, comment #5:

if you already use skip_injail_passwd_check=1 you should not get the error "abort, failed to find user 1007 in /var/www/clients/client6/web26/etc/passwd" ???? This error is in a piece of code that is disabled by the skip_injail_passwd_check=1 setting.

Olivier Sessink <oli4>
Project Administrator
Thu 21 Jan 2010 12:27:56 PM UTC, comment #4:

this error indicates a problem with your /var/www/clients/client6/web26/etc/passwd file, can you attach the exact file instead of copy&paste ?

a workaround in the mean time would be:

[webuser]
skip_injail_passwd_check=1
injail_shell=/sbin/jk_lsh

Olivier Sessink <oli4>
Project Administrator
Thu 21 Jan 2010 12:20:40 PM UTC, comment #3:

Please forgive me, its been a while since I setuip jailkit. We added a feature remember for this kind of setup.

I installed jailkit after the ispconfig setup so a config was needed

[DEFAULT]
#relax_home_group=1
skip_injail_passwd_check=1
injail_shell=/bin/bash
env = TERM, PATH

skip_injail_passwd_check this was needed.

Dan Rossi <electroteque>
Thu 21 Jan 2010 01:36:17 AM UTC, comment #2:

Apologies mate, here is more info. I'm using an ispconfig setup so its not an issue with openvz. There is a root user attached to a website, and then a shell user which has the same userid as the root user. This is the errors i get

Jan 20 21:39:35 shared sshd[9082]: pam_unix(sshd:session): session opened for user webuser by (uid=0)
Jan 20 21:39:35 shared sshd[9082]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Jan 20 21:39:35 shared sshd[9082]: subsystem request for sftp
Jan 20 21:39:35 shared jk_chrootsh[9083]: now entering jail /var/www/clients/client6/web26 for user webuser (1007)
Jan 20 21:39:35 shared jk_chrootsh[9083]: abort, failed to find user 1007 in /var/www/clients/client6/web26/etc/passwd
Jan 20 21:39:35 shared sshd[9082]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Jan 20 21:39:35 shared sshd[9082]: pam_unix(sshd:session): session closed for user webuser

in the passwd file its

webuser:x:1007:1006:::/sbin/jk_lsh

Maybe try this

in /etc/passwd

web26:x:1007:1006
webuser:x:1007:1006

where web26 is the root user and webuser has the same uid to the root user

in the chroot passwd file

webuser:x:1007:1006:::/sbin/jk_lsh

See what you get. If I use a different shell to jk_lsh it will still close the connection but no error is produced.

Dan Rossi <electroteque>
Wed 20 Jan 2010 07:58:19 PM UTC, comment #1:

I have no openvz experience at all, but it is a bit weird if you see no logging at all. If you run jk_chrootsh from a terminal as regular user, do you get a logging error like this?

Jan 20 20:54:30 uitsmijter jk_chrootsh[2321]: abort, homedir '/home/foo' for user foo (1000) does not contain the jail separator <jail>/./<home>

Or if you run jk_chrootsh as root?

Jan 20 20:55:37 uitsmijter jk_chrootsh[2363]: abort, jk_chrootsh is run by root, which does not make sense because user root can break out of a jail anyway

you might want to run
grep jk_ /var/log/*
and look at your syslog configuration.

Olivier Sessink <oli4>
Project Administrator
Wed 20 Jan 2010 02:05:48 PM UTC, original submission:

in an openvz container jailkit fails the user to login to ssh or sftp. There is absolutely nothing logged, tried everything in the documentation, no logging is happening. When trying to login to ssh it exists with "connection closed".

What is going on ?

Dan Rossi <electroteque>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by oli4 (Posted a comment)
  • -unavailable- added by electroteque (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Jan 2010 12:59:24 PM UTColi4StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1