[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Jailkit-users] Problem in the second jail
From: |
Tzury Bar Yochay |
Subject: |
[Jailkit-users] Problem in the second jail |
Date: |
Thu, 11 Dec 2008 10:23:32 +0200 |
I wanted to create two jails, one for a user named test and the other
for a user named test 2
For user named 'test' I did as follows:
sudo mkdir /jail
sudo chown root:root /jail
sudo jk_init -v /jail jk_lsh
sudo jk_init -v /jail extendedshell
sudo jk_init -v /jail git
sudo adduser test
sudo jk_jailuser -m -j /jail test
sudo mkdir -p /jail/home/test
sudo chown test:test /jail/home/test
at this stage looking at the passwd file by:
sudo nano /jail/etc/passwd
I got the line for user 'test' and I continue from there by editing:
test:x:1001:1001:,,,:/home/test:/usr/sbin/jk_lsh
becomes:
test:x:1001:1001:,,,:/home/test:/bin/bash
and
sudo cp /home/tzury/.bashrc /jail/home/test
sudo chown test:test /jail/home/test/.bashrc
When I switched to the other user 'test2'
I followed the same steps as:
sudo mkdir /jail2
sudo chown root:root /jail2
sudo jk_init -v /jail2 jk_lsh
sudo jk_init -v /jail2 extendedshell
sudo jk_init -v /jail2 git
sudo adduser test2
sudo jk_jailuser -m -j /jail2 test2
sudo mkdir -p /jail2/home/test2
sudo chown test:test /jail2/home/test2
and then, when looked at the passwd file by:
sudo nano /jail/etc/passwd
there was no line for 'test2' user.
What am I missing?
- [Jailkit-users] Problem in the second jail,
Tzury Bar Yochay <=