I just re-installed Debian testing from DVD1. I allowed a root account and input the desired password. After installation upon first boot I was unable to do much because root password was not accepted and sudo was not installed, so I could not do much. I put the DVD back in and booted it into rescue mode, after a while selected the partition of the new installation and I was presented with options, one of which is to open a shell within the root partition selected.
This puts me in a chroot, I then typed:
Then entered the same password, again to confirm, then exited, reboot the OS and the password now worked.
If your buntu disk has rescue mode, it may offer to put you in a chroot like Debian does, if not, you will need to chroot manually to re-input the desired password. Basic steps for chroot in the code box below.
Code:
mount /dev/xxxx /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
"do what you want to do"
exit
umount /mnt/sys
umount /mnt/proc
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt
There is a reason for rescue or recovery options of installation media, this is one that is simple to fix using install or live media, it don't necessarily have to be same version as the OS installed.
EDIT: You will need to put your user name as such: sudo chpasswd user