When you boot your machine, you should get the GRUB menu displayed. If your machine only has Ubuntu, this is probably hidden. After the BIOS checks, you should see "Press ESC to enter GRUB" or something like that. Press Escape, and select "Ubuntu 2.6... (Recovery Mode)". This should boot you into Single User mode, and you now are logged in as root.
Enter the command:
at the prompt, and enter a new password for yourself. You won't see anything echoed to the screen, but this is OK.
Now enter the command:
Hopefully, when the login screen comes up, you should be able to login with your new password.
I hope this helps
--Ian