Reinstalling iOS on mac - app store login not accepted
I have a old iMac (circa 2008) that I have been trying to reuse.
I had some disk errors so after using Disk Utility to try to repair, I erased the disk. Now I am trying to reinstall the iOS (Yosemite).
When asked to login to the app store I enter my password - it says it is wrong and trust me I have checked and rechecked (eg on my other devices). I get the 2 factor approval come through on my other devices - if I approve I get the code but the old Mac just sits there doing nothing.
If I click on "forgot password" I get the spinning wheel forever.
Any tips on how to progress?
Many thanks
T
iMac, OS X 10.10