Archive for the 'Linux' Category

Mar 17 2008

Keychain for Fedora

Published by Bill under Linux

I wanted something similar to Keychain on OSx for Linux and I remembered a shell script from years ago. I did a quick yum search and found a keychain package managed by Gentoo. You can find the full how-to here, but the basics are simple if you are familiar with ssh keys at all. First, install it using sudo install keychain. After it’s installed, add a line to your ~/.bash_profile that looks similar to:

/usr/bin/keychain ~/.ssh/id_dsa
. ~/.keychain/`uname -n`-sh

Then add the following line to .bashrc as some terminals (gnome-terminal for one) do not log in each time and will not see the sourced environment variables above:

. ~/.keychain/`uname -n`-sh

You can add as many paths to private keys as you want. Now fire up a terminal, and you will be prompted for you passphrases as if you had run ssh-add. From now on, any terminal you start will have your keys loaded. It works well and I have not had any problems yet. See the man page or the link above if you want further information as there are options that I have not mentioned here that you may be interested in.

No responses yet

Feb 25 2008

Checking for Root Kits

Published by Bill under Linux

For a long time I have used a program called chkrootkit for root kit scanning on Linux. This program recieved a much needed update in December of ‘07. To use it, download the package, extract it, and run make. Finally run chkrootkit > rootkit_scan.txt. After it finishes, view the results in rootkit_scan.txt. This is a really nice tool to add to your security arsenal.

No responses yet

Feb 24 2008

Sun Java on Fedora 8

Published by Bill under Linux

I seem to struggle with installing Sun’s Java on Fedora every time. Here are the quick steps to get it working including the Firefox plug-in. I hope this helps someone.

  1. Download Java from Sun as a self extracting rpm.
  2. Remove java icedtea if it’s installed
    • sudo yum -y remove java-*-icedtea java-*-icedtea-devel java-*-icedtea-plugin
  3. Install Java and answer yes to the license agreement (this is for version 6 update 3, you will need to adjust the filename to match the version you downloaded)
    • sudo sh ./jre-6u3-linux-i586-rpm.bin
  4. You will need the following packages to get the Firefox plug-in to work
    • sudo yum -y install compat-libstdc++-33 compat-libstdc++-296
  5. Now symlink the plug-in (this is for Firefox 2.0.0.12 so you will need to adjust the path for your version of Firefox
    • cd /usr/lib/firefox-2.0.0.12/plugins && sudo ln -s /usr/java/latest/jre/plugin/i386/ns7/libjavaplugin_oji.so
  6. Setup alternatives to point to Sun’s Java
    • sudo /usr/sbin/alternatives –install /usr/bin/java java /usr/java/latest/bin/java 2 /usr/sbin/alternatives –config java
    There are 2 programs which provide 'java'.
    Selection    Command
    -----------------------------------------------
    *+ 1        /usr/lib/jvm/jre-1.5.0-gcj/bin/java
    2           /usr/java/latest/bin/java
    
    Enter to keep the current selection[+], or type selection number: 2
  7. Verify that the correct version of Java is being used
    • java -version
    java version "1.6.0_04"
    Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
    Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)

That should do it. Please let me know if you have any questions or find any problems with this little how-to.

No responses yet