.vimrc file

This file can be used to set preferences for the vim. Following are some of
settings frequently used by me.

"syntax enable" Enables programming language syntax high lighting.
"set background=dark" Makes the background in the vim to be dark.

Mounting Samba shares in Linux client


Samba shares cannot be nfs mounted in the linux client. They have to be mounted using smbmount or mount -t smbfs option. To do this, check to see if the smbfs package has been installed in your system. If not, install the smbfs package by doing the following.

#apt-get install smbfs

Note: In my case I had a latest version of samba-common package that the one required by the smbfs in the apt repository. I removed the samba-common package by doing "apt-get remove samba-common". Then proceeded with the above mentioned command.

Once the installation is done, check to make sure you have "smbmount" installed in /usr/bin directory.
Issue the following command.
#smbmount //192.168.2.11/video /home/kriss/nfsvideo -o username=kriss,dmask=77,fmask=777

Note: My samba share in the server exports "/home/video" directory as "video" share. Don't provide the complete path for the share directory, just provide the share name as above. Replace "kriss" with the user name in the server.

You will be asked for the password the username you specified. Once it is successful you will see the share mounted in the local directory (/home/kriss/nfsvideo).



Del.icio.us :

System Recovery in Ubuntu after a configuration file change

I modified xorg.conf file to remove synaptics driver from starting up (before modifying any file , it is a good idea to save the original as *.original file, in this case save the xorg.conf to xorg.conf.original). However, after this change the xserver wasn't starting. To fix this, I had to boot the laptop using the kbuntu cdrom and mount the harddisk. Once mounted I was able to access the /etc/ directory and copied the original xorg.conf file to replace the file I modified. Here are the steps:

1. Boot using kbuntu live cdrom.
2. Mount the hard disk: The primary ide drive is always hda1.
#mount /dev/hda1 /mnt/harddisk
3. Change to /mnt/harddisk and access the /etc/X11 directory.
4. Copy the xorg.conf.original file to xorg.conf.
5. Reboot the system.

Now the system should be up and running.

Ubuntu In Laptop - Enabling TKIP in Linux

Ubuntu WPC54g card installation with TKIP Enabled

Finally I got the WPC54g working in my Dell c610 laptop.

My home network has the SSID broadcasting disabled and uses PSK-TKIP security. It was a big pain in the neck to use the open source ndiswrapper and wpa_supplicant. This weekend I stumbled on this little company called Linuxant (hmm.. where are they located?) that provides an easy to use driver loader for a nominant price of $19(US). They allow you to try the software for upto a month. I don't mind paying that for a linux company if it really works and makes my life easier.

Did I make the right decision to go with Linuxant's driver loader. Oh yes, it is a breeze to install the driver. Honestly this is the first time I've experienced a browser based install for a linux software. Here are the steps in brief to install the software. I will add more information if anybody needs.

1. Download linuxant's excellent installation tool.
2. Run the dldrdriverloader.run, it will launch a web browser and will ask for windows driver .ini file and
3. download wpa_package from the link in linuxant's website. For more about wpa_supplicant see here.
4. build it using the dldrwpaconfig tool
5. Use KWifiManager to monitor the signal strength
6. Open /etc/wpa_supplicant.conf file and add the following.
# WPA-PSK/TKIP

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="example wpa-psk network"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="secret passphrase"
}
7. If needed do /etc/init.d/dldrdriverloader restart
8. Launch KWifiManager to see if the wireless network is connected.
9. You can either use iwconfig/ifconfig or use the network config tool to activate the wlan0 interface.

Your wireless connectivity should be up and running now.

MP3 Player for Fedora

Fedora doesn't come with an MP3 player by default. By the way if u want to play mp3 files right out of the box, then Fedora is not a good option. Try the excellentSimplyMEPIS, an excellent distro based on debian. It comes with every thing required for a desktop system. For those of you with no choice other than Fedora due to various reasons the only way out to is to follow this simple instruction to install a plugin for the Rhythmbox player.

Ubuntu Installation In Laptop

1. Install Ubuntu with default options.
2. Install Ubuntu updates.
3. Setup screen saver.


Update Packages with Synoptic Package Manager
1. Select Ubuntu 5.10 "Breezy Badger" (Binary)
2. Add "Community Maintained (Universe)" version.
3. Added "gcc", make, kernel sources, iptables development libraries,svn,

Install linuxant driver:
1. Download dldrinstall.run file.
2. Run dldrinstall.run file. This will unpack and install the driver. Then it will ask you to launch the brower and point it to the 127.0.0.1:xxxx. Follow the instruction and download the appropriate windows driver (in my case it is wpc54g driver).
3. Buy the linuxant driver for 19.95. Follow the instructions to generate the license key. Input the license key in the webpage. Now your driver is installed.

Install and Configure wpa supplicant:
1. Go to http://www.linuxant.com/driverloader/wlan/full/downloads.php page to download wpa supplicant for debian package.
2. Install the package using "dpkg -i filename" command.
3. Installation will ask you run the command "/usr/sbin/dldrwpaconfig" from root shell. Run it.
4. When it asks the question "Do you want to compile supplicant with OpenSSL support" say "yes".
5. It will ask you "the configuration script supports only wpa-psk" say "yes"
6. It will ask you the wpa preshared key. Supply the pre shared key.
7. Go to the networking tool and activate the wireless interface. (make sure you specify the static IP incase if you use static IP configuration.
8. Now your wireless connection should be up and running.

libipq links for working with iptables in linux

http://www.eecs.harvard.edu/cs143/pa3/

http://www.crhc.uiuc.edu/~grier/projects/libipq.html

http://lists.netfilter.org/pipermail/netfilter-devel/2005-February/018631.html

TCP syn attack
http://www.networkdictionary.com/security/TCPSYNAttack.php?PHPSESSID=c2a79111d168faf

Summary of the netfilter developer workshop 2004

Harald Welte

http://www.netfilter.org/documentation/conferences/nf-workshop-2004-summary.html

Linux netfilter Hacking HOWTO

Linux 2.4 NAT HOWTO

Netfilter Extensions HOWTO

Rusty's Unreliable Guide To Kernel Hacking

IP Tables Tutorial

IP Table Source Code

NetFilter Wiki

Rusty's Remarkably Unreliable Guides

Unreliable Guide To Hacking The Linux Kernel

Unreliable Guide To Locking

IPTable extension writing tutorial

netfilter module example




Shell Programming


Learning the Shell

vnc server configuration

I'm using tightvnc from my client machine (windows xp) to connect to the ubuntu server. However, the tighvnc client didn't display the screen beyond 640x480. So the screen was smaller in the client machine.

Solution: Edited the vnc.conf file in /etc directory to specify $geometry = "1024x960";... now the screen in the tightvnc client is big enough to see most of the window elements in the server. Now I have to figure out how to start vncserver automatically.
Chapter 2: Preparing a New Partition.

Since I used a linux machine with all the drives used up, I didn't want to create a new partition. I followed the hint mentioned in this document.

1. Created a directory /home/lfs for using as the mount directory.
2. Created a mount point directory /mnt/lfs
3. Add the following two lines to .profile file in the root directory.
LFS=/mnt/lfs
mount --bind /home/lfs /mnt/lfs

Chapter 3: Packages and Patches

1.Create a working directory for the downloaded packages and patches with the following command:
#mkdir -v $LFS/sources
2. Make this directory writable and sticky.
#chmod -v a+wt $LFS/sources

Isn't outrageous?

UK govt has asked individuals/businesses to handover their private keys! The reasoning behind this is to decrypt terrorist communication. Read the article here.

Power and Terror: Noam Chomsky in Our Times

Last night I saw this DVD rented from netflix.com. Noam Chomsky is a very knowledgeble person. You can see him quoting exact dates an incident happened in his QandA session with the audience. He is a powerful speaker with no rhetoric. However, the film itself doesn't do justice to this man. They could have done a better job rather than portraying him as just a speaker.

Quote from the film:
"If you want to stop terrorism stop doing it"

Funny and Informative info on evolution

Interesting article from Forbes.

Excerpt:
"In the pre-Cambrian period, about 600 million years ago, our worm-like ancestors had a central task to perform: reproduction. This involved shedding sperm and eggs into the water, nothing more, and they co-opted the openings and apparatus that they already had handy for excretion to do the job. Shedding gametes, shedding feces…similar tasks, right? That expedient sharing of those two functions had long-term consequences we live with right now: Our reproductive organs are coupled to our organs of excretion, which later also got tangled up with our hind limbs. Now we have to deal with yeast infections and a pelvis that doubles as both a birth canal and a base for posture and walking.

What if that worm-like ancestor instead used its other body opening, the mouth, to expel gametes? Reproductive function would be moved forward, away from other messy, but necessary functions. Of course, it would mean that a kiss would be fraught with major new connotations and consequences, but I think we could cope."






Linux to compete with Windows

Ok.. I have been trying to run linux in a laptop for sometime now. I ran into several annoying issues to make linux work in the laptop. However, I would really really like to see people using Linux in the laptop and desktop instead of Windows. Right now, using linux in a laptop or desktop as a full fledge OS is out of question even for me. I cannot think of normal folks who use it windows for their day to day work. Linux desktop/laptop community need a savior who could make right noises and moves to make things easier for anybody to have an alternative to MS.

On this light, I hear Larry is trying to buy Novell to get into Linux business. I'm only reminded of the bid Oracle made with its ill fated low cost computer. I'm willing to bet this time around Oracle learnt its lesssons and making a strategic move. I'm all for somebody like Larry taking the Linux and making it suitable for mass usage. There is also a suggestion in slashdot.org and other places urging Larry to look into Ubuntu as an alternative to Novell (why carry the baggage of Novell's other products). I'm a big fan of Ubuntu, however I think Ubuntu should be left alone.

In any case, here are some of the items Oracle needs to take care of if it ever wants to compete with Microsoft on desktop/laptop turf:

  1. Consider enhancing ubuntu's synaptics or suse's yast to aid users to install software easily.
  2. Enhance wireless support for Linux. Especially urge big wireless card vendors to provide drivers for linux.
  3. Don't provide options to move the menu's to different locations. This is a big problem with new users of kde/gnome. There are duplicate menu items or they are not arranged properly.
  4. Standardize on GUI tools. There are thousands of tools available in Linux and make things worse every distro has its own set of tools to manage networks, users etc. For my grandma to use linux the GUI tools need to be standardized.

Ubuntu In Laptop - Enabling TKIP in Linux

Ubuntu WPC54g card installation with TKIP Enabled

Finally I got the WPC54g working in my Dell c610 laptop.

My home network has the SSID broadcasting disabled and uses PSK-TKIP security. It was a big pain in the neck to use the open source ndiswrapper and wpa_supplicant. This weekend I stumbled on this little company called Linuxant (hmm.. where are they located?) that provides an easy to use driver loader for a nominant price of $19(US). They allow you to try the software for upto a month. I don't mind paying that for a linux company if it really works and makes my life easier.

Did I make the right decision to go with Linuxant's driver loader. Oh yes, it is a breeze to install the driver. Honestly this is the first time I've experienced a browser based install for a linux software. Here are the steps in brief to install the software. I will add more information if anybody needs.

1. Download linuxant's excellent installation tool.
2. Run the dldrdriverloader.run, it will launch a web browser and will ask for windows driver .ini file and
3. download wpa_package from the link in linuxant's website. For more about wpa_supplicant see here.
4. build it using the dldrwpaconfig tool
5. Use KWifiManager to monitor the signal strength
6. Open /etc/wpa_supplicant.conf file and add the following.
# WPA-PSK/TKIP

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="example wpa-psk network"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="secret passphrase"
}
7. If needed do /etc/init.d/dldrdriverloader restart
8. Launch KWifiManager to see if the wireless network is connected.
9. You can either use iwconfig/ifconfig or use the network config tool to activate the wlan0 interface.

Your wireless connectivity should be up and running now.