How do I change a username? (shortname and home folder)
Under Linux, this would be a no brainer. Just go into /etc/password and edit that, and rename the directory in /home. I want the new shortname and the new home folder to match after the change.
Apple's own instructions work quite well. There may be more complex and faster ways out there, but I've never run into an issue (such as incorrect permissions) with these steps.
Mac OS X v10.6 and earlier: How to change user account name or home directory name
In System Preferences, Users & Groups, right click the username in the list on the left and select Advanced Options. Edit the Account name field and click Ok.
Ideally you'll also want to edit the Home directory to match the new username, although this isn't strictly necessary.
I really don't like to edit a user in place since it's so simple to delete the user (preserving the home folder) - rename the folder as root - make the new user with the correct short name matching the renamed folder.
The preference pane will see that you already have /Users/newshort and offer to inherit the folder. It does the best job I know of in setting ownership and correcting the ACL needed for your home folder to work as Apple intended.
- Check your backup is current - just in case
- Do the delete
- Do the move in terminal
sudo -s
followed bymv /Users/tester\ \(Deleted\)/ /Users/test
- Do the create