I have created a new user but the new user's home directory has the old users path. How can I update my new user's home directory so that the terminal opens to this directory and all software considers this new directory my home directory? I'm using OS x 10.8.4.
Apple's support site provides steps to change the "account name" (that is, the name of the home folder for a particular user).
- Enable the root user (using these steps).
- Log in as root.
- Navigate to the /Users folder.
- Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
- Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
- Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
- Choose Log Out from the Apple menu. Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
- After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
- Disable the root user (using these steps).
A safer way to change the home folder associated with an account is to do so through System Preferences.
- Click on the Apple menu, then System Preferences.
- Select Users & Groups.
- Click the lock at the bottom left and authenticate as an administrator.
- Right-click on the account you want to change and select Advanced Options.
- Change the "Home directory" path and click OK.
You can assign a home folder to something other than "/Users/yourUserName" in the Terminal.
sudo dscl . -create /Users/YourUserName NFSHomeDirectory /path/to/new/home/folder