IMac – How to reset iMac to factory defaults

imacinstallmacosrestore

I want to sell my iMac (2011) and I want to reset the system and remove all my data. I tried the Command-R method. It wants me to enter my Apple ID and password but I don't want to do this! I want to pre-install the fresh OS X and let the new user finish the set up as he would after buying a new iMac (enter/create his own Apple id, time zone, etc.).

Any ideas how I can do this?

Best Answer

Try this SE question and answer:

Actually, you should be able to do it by removing a hidden system file which tells OS X that setup has run.

It's a hidden file, so you will have to remove it using Terminal, or show hidden files in Finder. You can remove the file like so:

rm /var/db/.AppleSetupDone

...then restart your computer immediately.