How do I delete the user that was imported on a new Mac from a Time Machine backup?

I bought a new Mac and imported all data from my previous Mac using my Time Machine backup. Everything is running smoothly. The only "problem" I want to get rid of is the following:


On my new Mac I set up a new user as admin at the very beginning during the set up process and shortly after, when the new Mac started to import from my Time Machine back up, the user (admin) of my previous Mac got imported onto my new Mac. So now I have two users: One with admin rights and one user and want to get rid of. When unlocking the editing choices under >System Preferences >Users & Groups and clicking on the user (being signed in as the admin), I can't delete the user. The little minus ( - ) is greyed out. I can only add new users. How can I delete the second user?

MacBook Pro TouchBar and Touch ID, macOS High Sierra (10.13), 3.1GHz Quad Core i7, 16GB, 1TB

Posted on Oct 2, 2017 8:32 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 6, 2017 2:54 PM

I just had the same problem. My husband's account was also set to Admin (so I had two admin accounts on my Mac). I needed to delete it, because he never uses it and the iCloud there was set to old email I no longer use, so I couldn't log out from the iCloud. I had the same issue you are describing: logged into my admin account, click the padlock, his account can't be deleted because the ( - ) is greyed out. Here is the catch, and once I did that, it worked for me - just clicking on the account list at the top right corner (between the clock and the Siri icon) and switching to admin account you want to keep DOES NOT log you out of the airwalker account you want to delete. it simply switches between the users. You must click on the apple symbol on the top left corner and select "Log out Airwalker". Once I did that with my husband's account, I was able to successfully delete it after I logged in as the admin on my own account. Does that make sense?

27 replies
Question marked as Top-ranking reply

Nov 6, 2017 2:54 PM in response to airwalker

I just had the same problem. My husband's account was also set to Admin (so I had two admin accounts on my Mac). I needed to delete it, because he never uses it and the iCloud there was set to old email I no longer use, so I couldn't log out from the iCloud. I had the same issue you are describing: logged into my admin account, click the padlock, his account can't be deleted because the ( - ) is greyed out. Here is the catch, and once I did that, it worked for me - just clicking on the account list at the top right corner (between the clock and the Siri icon) and switching to admin account you want to keep DOES NOT log you out of the airwalker account you want to delete. it simply switches between the users. You must click on the apple symbol on the top left corner and select "Log out Airwalker". Once I did that with my husband's account, I was able to successfully delete it after I logged in as the admin on my own account. Does that make sense?

Oct 2, 2017 9:56 AM in response to leroydouglas

The name of the account I want to delete is airwalker


So all I have to do, is place the follwing:


sudo dscl . delete /Users/airwalker


in the command line like this:


drwxr-xr-x 8 root admin 256 2 Oct 14:42 .

drwxr-xr-x 46 root wheel 1472 2 Oct 16:24 ..

-rw-r--r-- 1 root wheel 0 15 Jul 22:35 .localized

drwxr-xr-x@ 41 Chris staff 1312 2 Oct 17:50 Chris

drwxr-xr-x+ 12 Guest _guest 384 29 Sep 14:27 Guest

drwxrwxrwt 18 root wheel 576 30 Sep 12:55 Shared

drwxr-xr-x+ 12 airwalker staff 384 2 Oct 15:10 airwalker

drwxr-xr-x+ 11 test staff 352 2 Oct 14:42 test

Airwalker-MBP:~ Chris$ sudo dscl . delete /Users/airwalker

Oct 7, 2017 12:57 PM in response to airwalker

I'm having the same issues and I believe that, on High Sierra, restoring the accounts from a backup with Migration Assistant (instead of from the recovery partition) is causing same corruptions to the directory database. Someone would suggest you to enable root, login with this and try delete the account from system preferences, or to delete it from Directory Utility or via command line. I can tell you that none of these work and the only workaround is to delete the plist file of the account in question by typing:


sudo rm /private/var/db/dslocal/nodes/Default/users/name_of_the_account_you_want_to_del ete


Replace "name_of_the_account_you_want_to_delete" with the short name of the account you want to delete. Terminal will ask your admin password, which will not show up while you write.


You also have another problem: you can't turn on FileVault, as in this thread. I don't know if that's relevant for you. Anyway, at the moment I still haven't found a solution for this second issue.


Lorenzo

Oct 7, 2017 12:59 PM in response to airwalker

I'm having the same issues and I believe that, on High Sierra, restoring the accounts from a backup with Migration Assistant (instead of from the recovery partition) is causing same corruptions to the directory database. Someone would suggest you to enable root, login with this and try delete the account from system preferences, or to delete it from Directory Utility or via command line. I can tell you that none of these work and the only workaround is to delete the plist file of the account in question by typing:


sudo rm /private/var/db/dslocal/nodes/Default/users/name_of_the_account_you_want_to_del ete


Replace "name_of_the_account_you_want_to_delete" with the short name of the account you want to delete. Terminal will ask your admin password, which will not show up while you write.


You also have another problem: you can't turn on FileVault, as in this thread. I don't know if that's relevant for you. Anyway, at the moment I still haven't found a solution for this second issue.


Lorenzo

Oct 7, 2017 1:02 PM in response to airwalker

I'm having the same issues and I believe that, on High Sierra, restoring the accounts from a backup with Migration Assistant (instead of from the recovery partition) is causing same corruptions to the directory database. Someone would suggest you to enable root, login with this and try delete the account from system preferences, or to delete it from Directory Utility or via command line. I can tell you that none of these work and the only workaround is to delete the plist file of the account in question by typing:


sudo rm /private/var/db/dslocal/nodes/Default/users/name_of_the_account_you_want_to_del ete


Replace "name_of_the_account_you_want_to_delete" with the short name of the account you want to delete. Terminal will ask your admin password, which will not show up while you write.


You also have another problem: you can't turn on FileVault, as in this thread. I don't know if that's relevant for you. Anyway, at the moment I still haven't found a solution for this second issue.


Lorenzo

Apr 1, 2018 5:28 PM in response to airwalker

Finally! I was now able to delete the second user account (standard user account) that got imported from my Time Machine backup from my old Mac. I believe Apple made it possible with the new macOS 10.13.4, but I am not sure. I first tried to solve the problem with the previously recommended link in this thread:

OS X: Deleted user account reappears; or, cannot use automatic login for a certain user account - Apple Support

Then, after going back to >System Preferences >Users & Groups and clicking on that user I wanted to delete, the little "-" was not greyed out anymore. I was able to delete it after making it an admin user account and restarting my Mac. So now I end up with only one user account, which, at the same time, is my admin account. Case closed! :-)

Oct 2, 2017 10:38 AM in response to airwalker

This could have been avoided by using Setup Assistant when you first started up your new Mac.


Migration Assistant will not allow the migration of a user account with the same name as an existing one. Many people have an issue with this because they startup their new Macs, bypass Setup Assistant, then create a user account using the same user name as used on the older Mac. Only to find out, after the fact, that Migaration assistant is not going to populate that account.


One way to correct it, is to just erase the new Mac's internal drive, and then reinstall the OS and then use Setup Assistant, when prompted to transfer the user account from your older Mac.

Oct 2, 2017 8:59 AM in response to leroydouglas

Thanks for your fast reply and help. I am not familiar at all with using the Terminal. I followed your instructions until "substitute the ACCOUNT name and copy and paste".


Do I have to delete the whole line or the user's name only?


And where exactly to I copy and past the following into? On the line/user name I deleted or onto a new line?

sudo dscl . delete /Users/ACCOUNT

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.

How do I delete the user that was imported on a new Mac from a Time Machine backup?

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