Now you’ll need to create a directory to mount the hard drive on.
Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.
sudo mkdir /media/sda1
The next command will mount the hard drive in the /media/sda1 folder.
sudo mount /dev/sda1 /media/sda1
Now it’s time for the command that actually does the magic: chroot.
Now you should be able to reboot your system and log yourself in with your new password.