Changing home directory wiped previous account?

I updated the user name in the “Home directory” field. Changed that name to match the new name of the home folder, but removed /Users/. For example, if “User name” is johnappleseed, then “Home directory” should be /Users/johnappleseed. But mine was just johnappleseed. I was prompted to restart my computer, and when I did everything was wiped out and all my files are gone.


is there anyone who could help me restore my files?



iPad Pro, iPadOS 15

Posted on Oct 23, 2023 11:15 PM

Reply
Question marked as Best reply

Posted on Oct 24, 2023 8:42 PM

If you have another macOS user admin account, then you can use it to fix your mistake by using the instructions in this Apple article for changing the name of the user account:

Change the name of your macOS user account and home folder - Apple Support


If you don't have another macOS admin user account, then you will need to trick macOS into running Setup Assistant again so another admin user account can be created by using the instructions in this article written by a respected forum contributor:

Restarting Setup Assistant to create Admin user account - Apple Community


Make sure to follow the instructions in both articles carefully. Every step & detail mentioned in the official Apple article for changing the macOS user name is absolutely necessary & critical.


FYI, be extremely careful whenever you are accessing anything listed as Advanced, or an Option which has been hidden by macOS by default. And always make sure you have a good backup before making any major changes to the system. You should always have frequent and regular backups of the computer and all external media (including the cloud) which contains important & unique data. There are a lot of new ways to lose access to your data with the newer systems due to major changes to the hardware, software, and security changes. If you had made this mistake while using macOS 14.x Sonoma, you would be needing to completely erase the whole Mac followed by reinstalling macOS & restoring from a backup since Apple broke the option to trick macOS into running Setup Assistant again.



Similar questions

6 replies
Question marked as Best reply

Oct 24, 2023 8:42 PM in response to zeemal64

If you have another macOS user admin account, then you can use it to fix your mistake by using the instructions in this Apple article for changing the name of the user account:

Change the name of your macOS user account and home folder - Apple Support


If you don't have another macOS admin user account, then you will need to trick macOS into running Setup Assistant again so another admin user account can be created by using the instructions in this article written by a respected forum contributor:

Restarting Setup Assistant to create Admin user account - Apple Community


Make sure to follow the instructions in both articles carefully. Every step & detail mentioned in the official Apple article for changing the macOS user name is absolutely necessary & critical.


FYI, be extremely careful whenever you are accessing anything listed as Advanced, or an Option which has been hidden by macOS by default. And always make sure you have a good backup before making any major changes to the system. You should always have frequent and regular backups of the computer and all external media (including the cloud) which contains important & unique data. There are a lot of new ways to lose access to your data with the newer systems due to major changes to the hardware, software, and security changes. If you had made this mistake while using macOS 14.x Sonoma, you would be needing to completely erase the whole Mac followed by reinstalling macOS & restoring from a backup since Apple broke the option to trick macOS into running Setup Assistant again.



Oct 24, 2023 9:41 AM in response to zeemal64

This is what it looks like.

version macOS is MacBook Pro (13-inch, 2017)


I went to System Preferences→Users & Groups, right clicking on my account and choose "Advanced Options". There are fields there where you can change your username (inexplicably labeled "Account name") and your home directory and I changed home directory name and it said to restart and after I did this screen showed up.


please help me restore back my original user.



Oct 24, 2023 11:00 AM in response to zeemal64

Hmm, there's more out of whack here than I first noticed. You don't even have the menu bar at the top of the screen. There is an option to hide it, much like the Dock, but I presume you didn't do that.


Fortunately, you can still access the settings. Click on the desktop, then press Command+, . Turn on the option to show Hard disks.


You can then close that box.


Now that you can see the main drive, double click that. By default this is all you should see at the root level:


If not, what else is there?


Then open the Users folder. Do you see anything other than the default Shared folder, and one user account?


Oct 24, 2023 9:50 AM in response to zeemal64

But mine was just johnappleseed.

User accounts are expected to be in the /Users folder. By eliminating that part of the path from your name change, you told the OS to create johnappleseed a level down, next to Applications, Library, System and Users. It will never find, or look for a user account there.


It may not have created/moved johnappleseed there at all. But instead, possibly, deleted the entire folder. Or, since it can't really create a user account at the root level, it simply made a new user account in the correct location.


Check both the root level and the Users folders. Is there anything out of place at the root level? Is there more than one account now in the Users folder?

Changing home directory wiped previous account?

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