chroot dengan jailkit di centos 5.5
Sistem operasi yang digunakan dalam kasus ini adalah centos 5.5 64 bit dan jailkit versi 2.14. Tujuannya adalah agar user tertentu (eg. testuser) di chroot dengan hanya diberi permission shell yang minimal serta boleh menggunakan text editor vi.
sebagai user biasa :
$ wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.bz2
$ tar jxvf jailkit-2.14.tar.bz2
$ cd jailkit-2.14
$ ./configure
$ make
$ su -
cd /home/gregor/jailkit-2.14
sebagai root :
$ make install
$ cp /etc/jailkit/jk_init.ini /etc/jailkit/jk_init.ini.orig
$ vi /etc/jailkit/jk_init.ini
tambahkan baris berikut :
[ldconfig]
executables = /sbin/ldconfig
regularfiles = /etc/ld.so.conf
cari section [editors] sesuaikan menjadi :
includesections = terminfo, ldconfig
cari section [basicshell] sesuaikan menjadi :
includesections = uidbasics, ldconfig
simpan lalu keluar dari vi
$ mkdir /home/jail
$ chown root:root /home/jail
inisisasi jail dengan perintah :
$ jk_init -v -j /home/jail basicshell editors
copy beberapa file ke jail
$ jk_cp -j /home/jail /usr/sbin/jk_lsh
$ jk_cp -j /home/jail /usr/bin/id
tambahkan user :
$ useradd testuser
$ passwd testuser
pindahkan user ke jail :
$ jk_jailuser -m -j /home/jail testuser
berikan direktori tmp untuk user dalam jail :
$ mkdir /home/jail/tmp
$ chmod a+rwx /home/jail/tmp
berikan bash shell untuk user dalam jail dengan menyesuaikan file passwd menjadi :
$ vi /home/jail/etc/passwd
testuser:x:501:501::/home/testuser:/bin/bash
cobalah untuk login dengan testuser dari komputer lain via ssh dan perhatikan bahwa testuser sudah di chroot.
Transfer PuTTY settings/configuration between computers
1. Click Start->Run and type “RegEdt32″ in the “Open” dialog. Click “Ok”
2. One RegEdt32 starts, you’ll be presented with an application
3. Press “Ctrl+F” to bring up the Find dialog. Enter the name of the key, “SimonTatham” in the “Find What” field, and make sure only “Keys” is checked in the “Look At” section of the dialog. Finally, click “Find Next”
4. When the search completes we’ll see the key name for which we’re looking.
5. Click File->Export. Give your file an appropriate name like, “putty.reg” and click “Save”
6. We’re done! Save the putty.reg file somewhere safe. The file doesn’t contain any passwords or actual SSH key values so, it’s relatively safe from prying eyes. Still, it does contain your configuration and that kind of data is a private matter.
7. Now on the target computer right click on the putty.reg file and choose merge







