Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1184952
  • 博文数量: 233
  • 博客积分: 6270
  • 博客等级: 准将
  • 技术积分: 1798
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-26 08:32
文章分类

全部博文(233)

文章存档

2011年(31)

2010年(202)

我的朋友

分类: LINUX

2010-11-03 15:19:35

jailkit官网:
 
tar -zxvf jailkit-2.0.tar.gz
cd jailkit-2.0
./configure
make
make install
mkdir /jail
chown root:root /jail

jk_init -v /jail basicshell
jk_init -v /jail editors
jk_init -v /jail extendedshell
jk_init -v /jail netutils
jk_init -v /jail ssh
jk_init -v /jail sftp

adduser thomas

jk_jailuser -m -j /jail thomas


vi /etc/passwd:
thomas:x:1001:500::/jail/./home/thomas:/usr/sbin/jk_chrootsh

passwd thomas

mkdir -p /jail/home/thomas

chown thomas:thomas /jail/home/thomas

vi /jail/etc/group
paste and save this:
thomas:x:500:


vi /jail/etc/passwd
paste and save this:
thomas:x:1001:500::/home/thomas:/bin/bash

cp /etc/skel/.bashrc /jail/home/thomas
chown thomas:thomas /jail/home/thomas/.bashrc

阅读(600) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~