I am locked out of my user account. Can I delete it and create another with the same name?

I am locked out of my user account, can I delete it and create another with the same name? And then import my data that's backed up on an external drive?

MacBook Pro

Posted on Nov 12, 2020 9:10 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 13, 2020 12:46 PM

I'd not delete the old account.


See if you can create a new administrator account by restarting the Setup Assistant:

  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold ⌘ + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.)
  2. Check and repair the drive by typing /sbin/fsck -fy then ↩ enter - as directed by the on-screen text.
  3. Mount the drive as read-write by typing /sbin/mount -uw / then ↩ enter.
  4. Remove the Apple Setup Done file by typing rm /var/db/.AppleSetupDone then ↩ enter.
  5. Reboot by typing reboot then ↩ enter.
  6. Complete the setup process, creating a new admin account.


Be very careful to notice the spaces in those Terminal Commands.


Once you've done that the computer reboots and it's like the first time you used the machine, except all your data will stile there. Your old accounts are all safe. From there you just change all other account passwords in the account preferences!!

29 replies
Question marked as Top-ranking reply

Nov 13, 2020 12:46 PM in response to iHope

I'd not delete the old account.


See if you can create a new administrator account by restarting the Setup Assistant:

  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold ⌘ + S until you see a black screen with white lettering. (If you end up back on the login screen after a flash of the black screen with white lettering, enter your password and it will return to the black screen.)
  2. Check and repair the drive by typing /sbin/fsck -fy then ↩ enter - as directed by the on-screen text.
  3. Mount the drive as read-write by typing /sbin/mount -uw / then ↩ enter.
  4. Remove the Apple Setup Done file by typing rm /var/db/.AppleSetupDone then ↩ enter.
  5. Reboot by typing reboot then ↩ enter.
  6. Complete the setup process, creating a new admin account.


Be very careful to notice the spaces in those Terminal Commands.


Once you've done that the computer reboots and it's like the first time you used the machine, except all your data will stile there. Your old accounts are all safe. From there you just change all other account passwords in the account preferences!!

Nov 13, 2020 11:39 AM in response to HWTech

Hello HW Tech,


Unfortunately the issue isn't about resetting the password on a macOS user account:.


I'm locked out because having upgraded to High Sierra, MacOS says it wants to repair my Library and asks for my password. However the space for entering the password is not responsive - ie, it's not possible to enter the password.


I'm wondering if I can delete my user account and create another with the same name. And then import the data that was in my account, that's backed up on an external drive. What do you think?


Nov 13, 2020 2:56 PM in response to BDAqua

Thank you BD Aqua,


As I understand it, following your instructions would create a new admin account with a new (different) name, correct?


However, just before upgrading to High Sierra I created a second admin account (just for me) with 'fictional' name. Let's call my long-time admin account iHope (my 'real' name) and the new admin account iWish.


After upgrading to High Sierra I was locked out of iHope (as described earlier) so have been using the iWish account instead without problems. I imported all my iHope documents into iWish (from backup drive) and have access to all the apps. I have not opened an Apple Mail account for iWish, nor imported the Mail account from iHope's Library.


The problem is that iWish is not in my real name (which I'd imagine would be a problem, for example, for Apple Mail and other online security). Meanwhile the iHope account is useless to me as it can't be used. I'd like to change the name of my iWish account to iHope but obviously can't do that while the original iHope admin account is still around!


That's why I'm asking whether it can be deleted, and iWish renamed iHope? If so, I'd then import Mail from the Library (from backup drive) and use Apple Mail as before?


Does it make sense or do you see problems with this idea?


Nov 17, 2020 11:05 AM in response to BDAqua

Hello BDAqua,


Thank you for the link, good to know!


So here's the thing. I'd like to rename iWish (my new admin account) iHope (the name of my old and inaccessible admin account).

But since, I suppose, there can't be two admin accounts with the same name the options seem to be...

1) Rename the iHope account Goodbye, and then rename the iWish account iHope

or

2) Delete the iHope account and then rename the iWish account iHope


Do you agree? If so, which option would be best?

If you don't agree, what would you do?


Final point, the current inaccessible iHope account is taking up 140 GB on the HD. There doesn't seem to be any good reason to keep it, right? (It's content is accessible on an external portable drive).


Thanks.






Nov 20, 2020 3:17 PM in response to BDAqua

Ok, with the Time Machine backup connected to the laptop, in the window I write "~/Library/Mail", and click GO. (Understood).

"then enter TM" - that's what I don't understand. Where and how do I enter TM, and what's supposed to happen?


I have the Time Machine icon in the bar at the top of the screen. The drop down menu offers "Enter Time Machine". Is that what you mean? If that's selected what happens? Does TM automatically make a transfer of the relevant data?

Nov 21, 2020 5:00 PM in response to iHope

Using Time Machine the two folder (Mail and Preferences) were 'imported' into the Library.


When I clicked open Apple Mail (email client) there was nothing in it. In Mail Preferences the three email accounts were set up again, configured as before. The emails poured in from the servers, and the accounts were restored to the way they were before.


However, all the numerous “On My Mac” email folders in the email client are missing! How can they all be restored to the email client?


Nov 23, 2020 10:36 AM in response to BDAqua

Thank you for that BDAqua.


Before proceeding, I have another question…


As mentioned before, I use a desktop Mac Pro and a laptop Mac Book Pro. The problem I posted at the very start arose when I upgrade both computers to from El Capitan to High Sierra. The upgrade to the desktop was trouble-free. The issues in this discussion relate to the laptop. With your help I’ve managed to recreate the laptop setup and my iHope admin account. All that remains is to recreate the Apple Mail client setup on the laptop the way it was.


In fact, the Apple Mail client setup on the laptop should be identical to the Apple Mail client setup on the desktop Mac Pro, right? Identical mailboxes for mail IN and SENT have now been set up. So all that remains is to match-up the “On My Mac” part of the laptop’s Apple Mail client with that of the desktop’s “On My Mac” (in Apple Mail).


My question is can I connect the laptop to the desktop in ‘Target Mode’ and import the mailboxes from the desktop Mac Pro in the way you’ve suggested?


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I am locked out of my user account. Can I delete it and create another with the same name?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.