Hello. My friend just gave me her broken Apple iMac A1311. She said that if I fix it, I can keep it. I googled the issues with white screen. I hooked the mac to TV, and got the same symptoms. So it is not a monitor. When I got to Mac Utilities, I did check hard drives, and there were no errors. I also erased the hard drive, through disk utility, after restore from time machine didn't find any restore points. So was trying to reinstall OS. I entered my Apple ID and password, and then when prompted, Apple id, password and code following password, which was supplied on my iPad for security purposes. I still got "Wrong username/password" message. So I have the following questions please:
The issue is likely tied to an upgraded Mac OS version that was "bought" (whether for actual money or for free) from the Mac App Store. Apple in its infinite wisdom now tying Mac OS upgrades "bought" through the App Store to an Apple ID...even if that upgrade was free. As a result, if that iMac was upgraded from the Mac OS that it was originally shipped with, I believe that upgrade OS is then tied to the Apple ID that "bought" the upgrade. So, to get around that, you will either need to reinstall the OS that it originally shipped with (which might get complicated...see below) or have your friend enter in her Apple ID information for you (not ideal).
1.) Does my friend needs to enter her apple ID informaiton to reinstall the OS?
It depends...see above.
If you are willing to go back to the Mac OS that was originally installed on the iMac, then you don't need her to enter her Apple ID information. To do this, it will depend on which specific iMac model you have. Unfortunately, Apple A1311 "model number" is not specific enough...there are several models that "model number" applies to. You will have one of two ways to do this: 1) Use Internet Recovery; or 2) Use the recovery media (either optical disc or USB flash drive) that shipped with the iMac originally.
The problem is that around the time of these various models, Apple transitioned from shipping Mac with recovery media (on optical discs or USB flash drives) to using an Internet Recovery models. As a result, it is possible that this particular iMac might have to use one or the other and I cannot tell which it will be.
If Internet Recovery is available, you will be able to press the Option-Command-R buttons upon booting up the iMac and it will boot to Internet Recovery mode. From there, you should be able to install Lion (aka Mac OS 10.7.x) by way of an Internet connection. No Apple ID should be required.
If Internet Recovery is not available (i.e. Option-Command-R does not work), then you will have to ask your friend if she still have the original recovery media that shipped with the iMac. If she does, then you will likely be able to reinstall either Snow Leopard (aka 10.6.x) or Lion (aka 10.7.x)...which ever the iMac shipped with.
From either option, then you should be able to "buy" (for free) Sierra (aka 10.12.x...which is the current Mac OS version) from the Mac App Store using your Apple ID.
Or you could ask you friend to enter her Apple ID information to reinstall whatever version she currently has on it, but it will still be "tied" to her Apple ID.
2.) Does the supplied code, which usually comes as 1 2 3 4 5 6 format, needs any blank spaces (I know less likely, but still wanted to ask)?
What code? You did not mention any code in the main paragraph. Best I can guess without further information is a 2 factor code if your friend has 2 factor authentication turned on for her Apple ID.
3.) I don't care about contents of the hard drive. I just want new OS that works, and I want to attach my apple ID. How to I factory restore?
4.) The white screen is not really white, but has this zebra like characteristics, one horizontal line is light greenm another is beige, and so it repeats 10 times. Is this normal in recovery mode?
No, it is not normal. Recovery mode should get you a "normal" screen just as if you boot regularly...just you are booting to recovery options.
It kind of sounds like it might be a hardware issue, to be honest...likely with the graphics card/system.