Category: Work related


Simple guide for executable chroot jail

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

1. Install Jailkit, CentOS rpm available in rpmforge repo. 2. mkdir -p # to define your jail root 3. jk_init -v -j ssh # to allow ssh in your jail 4. jk_jailuser -j # to move the user into the jail 5. Edit /etc/jailkit/jk_init.ini and /etc/jailkit/jk_socketd.ini # to match your system 6. jk_cp -v -f […]

A painful lesson of a linux quibble

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

It has been longly debated that there is not a liable way to do undelete on linux file system. Only for this, extundelete has provided a workaround. However, mainly the need of undelete comes from the over-powerful command “rm”. Suppose any user committed “rm -rf /*” or “cd /; rm -rf *”, the command will […]

Using OpenVPN to export NFS in private network

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

1. Follow instruction in http://fedoraproject.org/wiki/Openvpn to set up OpenVPN server on the gateway node of your private network, and OpenVPN client on your external nodes that need to access the NFS server inside the private network behind your OpenVPN server node; 2. Start the OpenVPN server and clients, in each client nodes, add custom route […]

Enable Java in your Firefox in RHEL4

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

Once you have your Java installed, in /usr/java/jre1.6.0_29* cd /usr/lib64/firefox-3.*/plugins ln -s /usr/java/jre1.6.0*/lib/amd64/libnpjp2.so libnpjp2.so Then restarted Firefox and once loaded, java will be working in your browser!

Remove stale nfs handle

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Have you ever tried to delete a file and noticed that it turned into a .nfs file? This is because some process still has an open file handle on this file. The .nfs file is typically named .nfs followed by a bunch of digits eg. .nfs000000000189806400000085. To identify the actually process which has the open […]

Using interactive R script in batch mode

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

According to R manual, http://cran.r-project.org/doc/manuals/fullrefman.pdf, page 411, ” Value A character vector of length one. Both leading and trailing spaces and tabs are stripped from the result. In non-interactive use the result is as if the response was RETURN and the value is “”. ” So, if you have an R script that used readline […]

When /etc/fstab is inconsistent

By: | Comments: 2 Comments

Posted in categories: Computer Tips, Work related

The system will drop you into a shell after  asking you root password. However, you cannot correct /etc/fstab since / is readonly. Now you need to do $ mount -o remount,rw / to enable it.  Then you are free to correct it.