This is how you would do this on BackTrack (you will note that Im not telling you how to do this from Ubuntu because this is not an Ubuntu forum).
The below is reproduced from memory, I don't have a BackTrack system handy ATM, so you may have to tweak it a little for your requirements. Use Google and the appropriate man pages to help.
The below assumes that you have booted the system from a BT4 DVD /USB and that the Ubuntu systems root (/) partition is mounted at /mnt/sda1. If that's not the case then adjust the commands as appropriate.
Use "fdisk -l" or "cat /proc/partitions" to show available partitions to mount, "mkdir" to create a directory to use as a mount point (e.g. /mnt/sda1) and the "mount" command to mount the partition to that mount point (e.g. "mount /dev/sda1 /mnt/sda1").
OK, that fulfills my spoon feeding quota for this month.
./unshadow /mnt/sda1/etc/passwd /mnt/sda1/etc/shadow > ~/password-hashes