Link to home
Start Free TrialLog in
Avatar of mkramer777
mkramer777Flag for United States of America

asked on

deleted apple username

Totally screwed up on this one.  I had setup some parental controls on my mac mini.  I had to add a new username to do some of these parental controls.  Well, it was so annoying to go to websites that I decided to get rid of it.  So I went into parental controls and deleted the account that was there.  But I deleted the main account.  I thought it was the 2nd account I had.  Now everything has reset of course on my mac.  Am I screwed or is there a way to get back the username and settings?  I was using outlook for mac and that is gone and wants to setup again with new user.  Did it delete or is it just somewhere on the hard drive and I can get to it again?  This is the most important.
Avatar of strung
strung
Flag of Canada image

When you delete a username in the Users and Groups preference panel, you are given the option of whether to delete the user folder.  Did you delete the user folder?

If you deleted the user folder, you will not be able to recover your settings unless you have a backup, say, on Time Machine.
Here is an Apple KB on restoring a deleted user:

https://support.apple.com/kb/PH14081?locale=en_US
ASKER CERTIFIED SOLUTION
Avatar of Michael Best
Michael Best
Flag of Japan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not necessarily, if mkramer77 deleted the user account in the users and groups preference pane but did not select the option to delete the user folder (the default is not to delete the folder), then the account is recoverable.
The easiest way to check is to see if the user folder associated with the deleted account still exists in the /users folder.
Avatar of mkramer777

ASKER

I do have a time machine backup.  Would that be the easiest?  How do I perform a restore using Time Machine?
When I click on the users folder I see a folder in there called mekmini.  When I open it it shows a - sign beside every folder and I can't get into any of them .  Permission denied.
That is normal. You will get permission denied when you attempt to access a user folder for anyone other than the user you are logged in as.

If mekmini is your old user folder, you don't need and shouldn't use the Time Machine backup. Just follow the instructions on the link I posted earlier. It is for Mavericks. Let us know if you are using a different version of the OS.
I have Yomsemite
Here are the instructions for Yosemite. Read all the way through first.
mkramer7772015-04-22 at 23:49:27ID: 40738250
"I do have a time machine backup.  Would that be the easiest?  How do I perform a restore using Time Machine?"

Follow the instructions given by support.apple.com

"OS X Yosemite: Restore a deleted user"
https://support.apple.com/kb/PH18899?locale=en_US
If somehow you can't recover from your Time Machine backups you can try the following too.

The deleted user restore would work if you had another account with admin privileges already.

If you still have a regular, account, you can boot into single user mode and add it to the admin group

If you have no admin or regular accounts available, I suggest booting into Single user mode and creating an new admin account.
http://www.maketecheasier.com/reset-os-x-account/

When you reset the account, you should create a new account with a different user name so that you can add back the previous account and copy the folders with the correct permissions.

Basically,
  Boot into Single user mode
  mount -uw /
  rm /var/db/.AppleSetupDone

Reboot
  You will be prompted for a new account, as if you gotten a new computer.

Once logged in, create your old account name.
Open Terminal

cp -pr "/Users/Delete Users/OLD_ACCOUNT_NAME /Users/NEWLY_CREATED_OLD_ACCOUNT_NAME
chown -R OLD_ACCOUNT_NAME /Usres/OLD_ACCOUNT_NAME