This question already has an answer here:
I have recently loaded Ubuntu from a CD. My administrator password doesn't work when logging into Ubuntu at the opening screen.
Boot while holding the shift key down. You'll then be greeted by a GRUB menu. You want to select boot recovery mode. Once in recovery mode you can passwd yourusername to set a new password.