mount -uw /
shutdown -h now
Your machine will relaunch into the new Macintosh wizard (you know, the Welcome video), allowing you to create a new admin account.
3. If you know your original Account Name, use the same name and the new account will automatically assign your previous home folder to this new admin account; and your apps, folders, keychain and docs are all there and you’re good to go (on that account at least). If you don’t know your Account Name, create a new one (you can recover your old one later).
If you still have accounts to recover, read on…
4. In your new admin account, open a Finder window and click on your Machintosh HD (your Mac’s primary HDD). Open Users and jot down the folder names (these are your lost accounts), all except your new admin account and Shared.
5. Now click on the Apple logo in the top left-hand corner of the screen, and select System Preferences…
6. Choose Accounts, unlock the padlock with your new Admin password, and then hit the + button to add a new account.
7. Create new accounts and remember to name each Account Name (AKA “Short Name”) the same as one of the folder names you jotted down in part 4 (via.). Each time OSX will ask you if you want to assign/associate the new account with the home folder of the lost account. Click OK.
And that’s that. All should be back to normal (short of the account avatars, which are lost, and you may have new login passwords if you didn’t replicate the olds ones).
I have checked everything. My photos, Apps, videos, downloads and settings are all back — after all, my entire home folder is restored.
I sincerely hope this helps at least one person out there. If it did, drop me an email and make my day. Losing your data is scary and is certainly a warning of the need to back-up! Or in my case, remember to back up the iMac more often.