Archive for May, 2008

Get rid of the U3 Launchpad on Your Sandisk Cruzer

Tuesday, May 27th, 2008

I love the Sandisk USB flash memory sticks. They are the best. The fact that they are made retractable and without the need for a cap of any kind makes them the best. Unfortunately, they bundle/format them with the annoying U3 Launchpad application for Windows which I have no use for. So, the first thing I do is remove it. Initially, I was doing low-level formats on the device on OS X, then Linux, but nothing worked unless you get this.

http://www.sandisk.com/Retail/Default.aspx?CatID=1415

Download the Launchpad Removal Tool and run it in Windows to nuke the U3 garbage. It gets rid of the CD emulation stuff, and the separate partition and just makes it a nice USB memory stick.

Denyhosts is your friend to stop ssh login attempts

Friday, May 23rd, 2008

Denyhosts

If you have a few linux servers that for whatever reason you have to leave open to ssh into on the standard port 22, denyhosts is a great way to get rid of the annoying daily logwatch email logs showing some losers somewhere have been spending all day doing a denial of service trying to brute-force attack their way in to ssh. Better ways are just to not even let ssh be accessible to non-legit IPs as well as disable ssh logins except for a couple of valid users, but in the case of mobile devices, locations, etc. you just sometimes need to have the ability to ssh into servers anywhere and other services might be dependent on the default port number, so changing it to get it out of the range of the script-kiddie or russian mafia is just not an option. It is one thing to have secure passwords, keys, etc. but just the fact they continue to bang on your servers can really rack-up bandwidth and annoyance.

Denyhosts is written in python and works with your logs to (based on your settings) inhibit attempts once thresholds you configure are met on login attempts. Really cool.

http://denyhosts.sourceforge.net

I have tested on ubuntu and centos and works great. The default configs are basically ready for centos/fedora/redhat out of the rpm or from source.

Moving Ubuntu Linux from PATA drive to SATA drive

Tuesday, May 20th, 2008

 Sata drivePata drive

I had mergy.org running on a very old laptop on a small ide 2.5″ drive. It was slow, but it was working. It got very tedious to work on though when anything went wrong and the webserver was really starting to get slow so I finally bit decided to move to newer hardware. But, the problem was that the drives on anything modern are serial ATA.

Here is what I did

1. Installed the same flavor and version of linux  on the new server and hard drive mimicing the partitions numbering on the old server. You could just get away with partitioning the drive in step 3 using one of the many RIPLinux bundled utils or fdisk, gparted, etc.

2. Took the drive out of the old laptop and put it in a usb external case and connected to the new server.

3. Booted on a RIPLinux CD - but any live CD would do really.

4. Blew away all files on the various partitions on the new server/drive

5. copied the files and directories over from the old drive with cp -prv

6. Changed the grub config in /boot to point to /dev/sda1 as opposed to /dev/hda1

7. Checked /etc/fstab to make sure mount points are OK

8. Edited the boot grub menu to make sure that point to the root directory

And it worked!

Recovery is Possible linux —> http://ftp.leg.uct.ac.za/pub/linux/rip/