Fear not. You have a way around this problem! You need to boot into single-user mode, which you can accomplish by rebooting your machine. When you see the blue screen with the words “Press any key to enter the menu,” press a key. At the GRUB boot screen, press E, which takes you to a configuration file. Use the arrow keys to go to the line starting with kernel, and press E again to edit that line. At the end of the line, add the word single, press Enter to put the change into place, and then press B to boot the machine.
Type passwd and then enter the new password twice as directed. When you finish, type exit and then boot the machine normally.