jailkit-users
[Top][All Lists]
Advanced

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

RE: [Jailkit-users] Jailkit questions


From: Jon Gullidge
Subject: RE: [Jailkit-users] Jailkit questions
Date: Thu, 19 Nov 2009 08:52:12 +0000

Hi Anson,

Look inside {jail}/bin, {jail}/usr/bin, in your case I think {jail} is /home/jail, so:
/home/jail/bin
/home/hail/usr/bin
Remove anything from in there you do not want. This should work fine as the jail innitialises outside of the jail so shouldn't be using any commands from within the jail :)

HTH

> From: address@hidden
> To: address@hidden
> Date: Thu, 19 Nov 2009 13:16:31 +0800
> Subject: [Jailkit-users] Jailkit questions
>
> Hello Oliver,
>
> A thank you for this great piece of code.
> I do have one question however.
>
> I have setup the jail using the following:
>
> mkdir /home/jail
> chown root:root /home/jail
>
> MODIFIED jk_init.ini like so -
> ---------------------------------------------------------------------------
> [basicshell]
> comment = bash based shell with several basic utilities
> paths = /bin/sh, /bin/bash, /bin/false, /etc/motd, /etc/issue,
> /etc/bash.bashrc, /etc/bashrc, /etc/profile, /usr/lib/locale/en_US.utf8
> users = root
> groups = root
> includesections = netbasics, uidbasics
> ---------------------------------------------------------------------------
>
>
> jk_init -v -j /home/jail basicshell
> jk_jailuser -m -j /home/jail example
>
> /home/jail/etc/passwd looks like this:
> sample:x:1000:1000::/home/sample:/bin/bash
>
> Well it works... mostly!
> Most attempts to do anything end up with a "bad command etc etc..."
>
> However, "cd" "pwd" "kill" etc still work...
> I'm guessing it's because they are tied in to the core bash shell functions
> somehow.
> Is there anyway to disable all these and any other "core" functions that
> don't have to exist in /bin/bash?
>
> I'm guessing one way to go around it would be to create a .bashrc that would
> create aliases with the same command names to "divert" the real function?
> Like a "kill" alias that would actually do nothing. Have not tried it yet
> but was hoping for something better from you.
> I'm sure I missed something as I've only been using Linux for about 2 months
> but have setup a VPS for a few friends (who need port forwarding SSH but
> don't need to do anything inside the VPS)
>
> Thanks again for your great code and seasons greetings in advance to your
> family!
> Anson
>
>
>
> _______________________________________________
> Jailkit-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/jailkit-users


View your other email accounts from your Hotmail inbox. Add them now.

reply via email to

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