Get Ready
Before you do any of this, make a backup. While this process should be painless, “should” is no guarantee. It’s also highly recommended that you turn off iCloud Documents and Desktop if you have that feature enabled. iCloud doesn’t always cope well with home folder changes.
Create an Additional Administrator User
First, you’ll need to create an additional administrator user on your computer. If you already have one, you can skip this part.
Open the “Users & Groups” pane under System Preferences.
Click the lock in the lower-left to unlock the Preference pane. Enter your password when prompted.
Click the plus button under the list of existing users.
In the resulting dialog box, click the drop-down that says “Standard” and change it to “Administrator.”
Enter a name for the user account. You can delete this account as soon as you’re done with it, so no need to get fancy.
Click the Create User button when you’re done.
Log Into Your New Admin Account
Now you’ll need to switch from the account with the home folder you want to change to your new (or existing) admin account.
Log out of the current user’s account under the Apple menu.
Log into your admin user. If this is the first time you’ve logged into the account, you’ll be prompted to sign into iCloud just as you were when you booted up your Mac for the first time. Don’t do this.
Open Finder and navigate to the home folder you want to modify. You’ll find it at “/Users/[user name].”
Rename the folder as you would any other directory. Enter your administrator account password when prompted.
Open the “Users & Groups” preference pane again.
Right-click on the name of your main account in the sidebar and choose “Advanced Options.”
In the resulting pane you’ll need to change two things: the account name and the home directory. Optionally, you can also change the full name (I did), but it’s not strictly necessary. Type your new user name into the account name and full name fields, and click the “Choose…” button to select your renamed home folder.
Click OK and quit System Preferences.
Log out of your admin account and back in to your main account.
Optionally, delete the admin user you created. Select the admin account in the Users & Groups pane and click the minus icon under the list of users. Make sure to select “Delete the home folder” when you do. Then, click Delete User.
Problems and Pitfalls
There’s a reason that changing the name of your home folder isn’t done regularly: It usually breaks something. In testing, this process, which is the process recommended by Apple, nuked almost all of my OS preferences. Dock settings, login items, keyboard shortcuts, iCloud – all of it was toasted. I had to manually reset everything. Things outside the OS can break too. Some programs on your computer specify the location of resources by using the full file path. Most of the time reinstalling the program will fix this issue. That’s what I had to do with my Adobe software.
Fixing Dropbox
Dropbox is a great example of a program that requires a little more cajoling. If the name of your home folder changes, Dropbox will complain when launched.
The dialog box makes it sound like a permissions problem, and Dropbox will request your username and password to fix it. However, that’s not actually the issue. The real problem is that the folder Dropbox is looking for no longer exists.
Here’s the fix for this particular problem.
- Download the most recent Dropbox installer.
- Open Terminal. If you’re not familiar, you can find it under Applications/Utilities or by typing “Terminal” into Spotlight.
- Type the following commands into Terminal. Enter them one at a time, and press Enter after each one. Copy and paste to avoid typos. You’ll have to enter your password after the first command, but each command afterwards will run without it. If you’re curious, these commands reset some permissions and trash some Dropbox setup files that refer to your old home directory.
- Reinstall Dropbox from the .dmg you downloaded earlier.
Conclusion
While it’s easy to change the name of your home directory, don’t enter into it lightly. You might have to spend several hours fixing problems both small and large, so make sure the change really matters.