[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] Debian Upgrade broke Jails, How to Fix

From: Chris Tankersley
Subject: [Jailkit-users] Debian Upgrade broke Jails, How to Fix
Date: Mon, 19 Mar 2012 23:18:38 -0400

I'm running Debian 6, and the last big update seems to have broken some, but not all, of my jails. I had installed the server as Debian 6 and Jailkit 2.14 and set up about 8 jails for different users. Everything worked great until the update when a few of the jails started to segfault when running commands. For example, I could log in as the jailed user 'bob', but when I ran `ls` I received a segfault message.

I tried to update these broken jails with jk_update, but the command just dropped back to a command prompt as if there was nothing to do. I then removed all the directories created by jailkit except for the user's home directory, and recreated the jail like this:

jk_init -c /etc/jailkit/jk_init.ini /var/www/clients/mydomain.com extshellplusnet                                                                                                                                                                                                       
jk_init -c /etc/jailkit/jk_init.ini /var/www/clients/mydomain.com limitedshell                                                                                                                                                                                                          
jk_cp -j /var/www/clients/mydomain.com/ -k /bin/bash 
jk_jailuser -s /bin/bash -j /var/www/cients/mydomain.com/ bob

I could log in and run commands, but the prompt now shows 'I have no address@hidden', like the jail cannot see /etc/passwd. I checked and there is a proper /etc/passwd file in the jail:

address@hidden:~# ls -alh /var/www/clients/mydomain.com/etc/passwd
-rw-r--r-- 1 root root 78 Mar 19 22:59 /var/www/clients/mydomain.com/etc/passwd

I can even see the file if I su as bob, so when I'm in the jail it all looks like fine. Inside the file, the UIDs match up to the system. In this case, bob is 1002 in both the system's /etc/passwd file and in the jail's /etc/passwd.

The last thing I can think of doing is backing up the files, completely destroying the broken jails and the users, and starting them over from scratch. Short of that, what else can I look at or try to fix them?

Thanks in advance for any help that can be provided.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]