I just got a new iMac and after going through setup it no longer seems to recognize my password. I was stuck outside my account so I reinstalled using recovery hoping it would reset everything including user information but I still get prompted for my initial password. I wonder if this is happening because I changed the username to lowercase at one point and somehow the change didn’t properly register in the OS? Anyway, is there any way around this problem?
Resetting User Account Password - This will work so long as you do not have a firmware/'EFI' password set on the machine.
1) Boot into your Recovery Partition holding down command + R at the startup chime
2) Select Terminal from your Utilities Menu Bar
3) Type the following bolded command in: resetpassword
4) From the new window that appears, select your user account and proceed.
5) Type in the new password and confirm the new password
6) Click Save, close this pane and quit Utilities
7) Select your boot volume when presented with "choose startup disk" and reboot your machine
It sounds like you have Filevault encryption turned on. That's the only way it should be asking for an old password after reinstalling the OS. You should boot into recovery mode, open Disk Utility, and reformat the drive, making sure it is NOT encrypted. Then reinstall the OS and it should be fine.