Saturday, December 5, 2009

Hosted Version Control

At work, we have the luck to have a dedicated change control team; they maintain a few separate version control systems for many, many projects. However, at home, I just work on one box and have a subversion server installed on a second. The only problem is backing things up, which is the most important reason for version control.

If you have important code - and I'd argue everything you write to keep more than a week is important - it's really, really crucial to back it up. Backing it up in the house is fine; I have two computers here, but that's still one point of failure, and I'm out of backups. If the primary fails and I find out too late the backup didn't quite work, I'm out of luck.

If you get to the point you have two backups in the same house, it's just as easy to keep the second backup at a friend's, with network speeds what they are. The problem is that you're then spending a not-insignificant amount of time working on keeping backups, and that feels more like work, and less like learning or leisure.

So I'm looking into hosted subversion plans. Here's the chart of the first three that were recommended, comparing their entry-level plans.

  Assembla Unfuddle Beanstalk
Cost of Cheapest Plan $3/user, 30c/100MB * Free Free
Storage 100 MB+ 200 MB 100 MB

*: Free for open source projects, but so is Sourceforge.

That might not be terribly relevant for anyone else; I didn't compare the number of users allowed, and really didn't look at any heavy-use plans. Assembla and Unfuddle also come with ticket tracking and a number of Agile tools built on top. Beanstalk appears to tie into third-party apps the best, including BaseCamp, FogBugz, and Twitter.

I'll go with Assembla or Unfuddle, as I prefer not to have to pay for BaseCamp if I want to add extra features. If I were doing this on a corporate level, I'd put Beanstalk back into consideration.

Friday, December 4, 2009

Windows 7 Password Reset

So, the reason I needed Knoppix was that I installed Windows 7... and was locked out on reboot. I'm assuming I fat fingered the password. Moving on.

My first try was ophcrack; it's a bootable ISO that starts the machine, finds all the user accounts, and runs the passwords against a rainbow table. It has two versions; XP and Vista/7. I'm running this on a netbook, so I installed the ISO to a USB key with the Universal Netbook Installer, which might be the best open source app I've seen recently. Unfortunately, ophcrack didn't work.

I found an older Knoppix boot CD; Knoppix is a version of linux that fits on one CD, and runs off of CD; it doesn't install to the hard drive, although it allows you to access the files on the hard drive. I had a little problem with my network, and then was able to move onto fixing the problem.

  1. Download chntpw from Debian; http://packages.debian.org/unstable/admin/chntpw
  2. Convert the deb file to a tar: alien --to-tgz
  3. Unpack the tar: tar xvzf ./usr/sbin/chntpw
  4. Move the executable somewhere handy: mv ./usr/sbin/chntpw ~
  5. Mount the hard drive. For Windows 7's default install to /dev/sda2: mkdir /mnt/disk; mount -t ntfs -o uid=Knoppix,gid=Knoppix /dev/sda2 /mnt/disk
  6. Change to the directory of the file with the passwords: cd /mnt/disk/Windows/System32/config
  7. Copy the password file, just to be safe: cp SAM /mnt/disk/
  8. List the usernames available to change: ~/chntpw -l SAM
  9. Erase your password: ~/chntpw -u
  10. Change directory out of the Windows 7 partition: cd
  11. Unmount the Windows partition: umount /mnt/diskd
  12. Reboot; you're done.

There's probably something to be said here about "physical security". On the plus side, this only blanks a password, so if someone uses this to get your data, you'll at least have a hunch at what happened.

In the meanwhile, it's time to create myself a password reset disk. (Apparently, Control Panel, search for "Password Reset", and have a USB key in the computer.)

Knoppix Static IP

As part of something today, had to run Knoppix, but it couldn't find DHCP. As a note to myself, more than anything, from a terminal:

ifconfig eth0 192.168.1.100
ifconfig eth0 netmask 255.255.255.0
echo nameserver 8.8.8.8 >> /etc/resolv.conf
route add default gw 192.168.1.1

And go. As less of a note to myself, that's using Google's new Public DNS service, which has some drawbacks, but does have a very, very memorable IP: 8.8.8.8.