jailkit-users
[Top][All Lists]
Advanced

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

[Jailkit-users] Jailkit questions


From: Anson
Subject: [Jailkit-users] Jailkit questions
Date: Thu, 19 Nov 2009 13:16:31 +0800

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




reply via email to

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