View Single Post
  #6  
Old 19th July 2011, 17:13
tspau tspau is offline
Junior Member
 
Join Date: Jun 2010
Location: Spain
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
Default

i keep working on it:

in my production server, when i create a jailed shell user, no jailed /bin carpet is created, only an /etc carpet whit a void passwd.

i've copied the /bin and /etc from a jailed user from my testing server, editing etc/group and etc/passwd with the data of the local user.

also i've changed the shell of the jailed user from /bin/false to /usr/sbin/jk_chrootsh

when i've tried to login, in auth.log i get:

Jul 19 15:18:11 mysite su[11866]: Successful su for satsh by root
Jul 19 15:18:11 mysite su[11866]: + pts/0 root:satsh
Jul 19 15:18:11 mysite su[11866]: pam_unix(su:session): session opened for user satsh by sshuser(uid=0)
Jul 19 15:18:11 mysite jk_chrootsh[11867]: abort, the current dir is /usr/var/www/clients/client49/web84 after chdir(/var/www/clients/client49/web84), but it should be /var/www/clients/client49/web84
Jul 19 15:18:11 mysite su[11866]: pam_unix(su:session): session closed for user satsh

ok, my /var is a softlink to /usr/var, so in ispconfig panel, i've changed at system -> server config -> web: all references from /var/... to /usr/var/...

i try to create a new user, site and shell user, but still is not created the jailed /bin neither /etc and in /etc/passwd the shell is still /bin/false

:-(

i try again to copy the bin and etc from a jail of my test server (editig /etc/group and /etc/passwd) and if i try to log now, auth.log shows:


Jul 19 16:09:03 mysite su[18609]: Successful su for tssatshell by root
Jul 19 16:09:03 mysite su[18609]: + pts/1 root:tssatshell
Jul 19 16:09:03 mysite su[18609]: pam_unix(su:session): session opened for user tssatshell by sshuser(uid=0)
Jul 19 16:09:03 mysite jk_chrootsh[18610]: now entering jail /usr/var/www/clients/client50/web85 for user tssatshell (5037)
Jul 19 16:09:03 mysite jk_chrootsh[18610]: ERROR: failed to execute shell /bin/bash for user tssatshell (5037), check the permissions and libraries of /usr/var/www/clients/client50/web85//bin/bash
Jul 19 16:09:03 mysite su[18609]: pam_unix(su:session): session closed for user tssatshell

any help?
Reply With Quote