Boot up in single user mode, by holding cmd s after the startup chime, if done properly you should see a command line, in single user mode type in
------------------------------------
fsck -fy Return
------------------------------------
Mount -uw / Return
------------------------------------
rm /var/db/.applesetupdone Return
------------------------------------
Make sure to type it in exactally as I did
When finished type in reboot and your computer will restart
If done correctly when starting up the Mac should show the welcome video and ask you to set up as a new pc
Do everything it asks you to, but when you get to the migration page press "do not transfer now"
After you will see a clean desktop, go into settings, users, (your account) then change the password
Hope this helps you used it on my own iMac