If the current account name already contains a space, you won’t be able to edit this field until the space has been removed. When modifying the account name (short name) or home folder name, it should not contain any spaces. Change the “Account name” field to match the new name that you gave the home folder in the Users folder.Choose Advanced Options from the shortcut menu. From the list of users, Control-click or right-click the user that you want to rename.Click, then enter the administrator name and password that you used to log in.Choose Apple menu > System Preferences, then click Users & Groups.
When renaming the folder, you’re prompted to enter the administrator name and password that you used to log in. Rename that account’s home folder and make note of both the old name and new name. The Users folder contains the home folder of the account you’re renaming. If necessary, create another administrator account, then remove it when you’re done. The administrator account needs to be a different account than the one you’re renaming. MacOS Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion