jailkit-users
[Top][All Lists]
Advanced

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

[Jailkit-users] Re: Problem in the second jail


From: Tzury Bar Yochay
Subject: [Jailkit-users] Re: Problem in the second jail
Date: Thu, 11 Dec 2008 10:45:25 +0200

Ignore the previous one
This is my own fault cause by lake of sleep and decent food.
AH! should have look at /jail2/etc/passwd instead of /jail/etc/passwd


On Thu, Dec 11, 2008 at 10:23 AM, Tzury Bar Yochay <address@hidden> wrote:
> 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?
>



-- 
Tzury Bar Yochay




reply via email to

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