Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
2  
Just a side note: in Linux it not so straightforward. You also have to update /etc/group, eventual mail alias (e.g., username@machine) and all the places where your old username is present (usually many). –  Matteo Sep 15 '11 at 5:21

3 Answers 3

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.

screenshot

share|improve this answer
    
How do we change the home directory to match the username? Renaming it in finder doesn't seem to work –  Enrico Susatyo Sep 15 '11 at 4:00
1  
Ingmar Hupp is referring to the dialog box that appears when you select "Advanced Options." –  kiamlaluno Sep 15 '11 at 6:19

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

share|improve this answer
1  
This is certainly the "official" way to go - but it has two drawbacks: The big one, is you end up with a different UID. It's not a big deal, but for most people, keeping user number 501 is the least hassle when connecting an external drive to another mac. The other is it's longer than needed. I presume Apple decided to have a much longer process to avoid telling someone to delete a user account since some people will not read things and end up deleting everything - potentially without a backup. –  bmike Sep 15 '11 at 20:05
    
I did not realize the bit about the UID - haven't run into a problem regarding the UID, but it's certainly something to consider. –  canderson Sep 15 '11 at 20:24
    
This worked fine for me, thanks. I thought it would be harder. –  Dan Sep 23 '11 at 23:44

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.


  1. Check your backup is current - just in case
  2. Do the delete enter image description here
  3. Do the move in terminal sudo -s followed by mv /Users/tester\ \(Deleted\)/ /Users/test
  4. Do the create enter image description here
share|improve this answer
    
You should probably run the "Repair Permissions" task in Disk Utility after performing this action. Since the Unix user ID will be different after deleting and creating a new user. –  sholsinger Sep 15 '11 at 18:38
1  
Repair Permissions never touches a user home folder. It only fixes software that Apple has installed by looking at /Library/Receipts (or the newer receipts database) - the user permissions are only set by the preference pane / dscl / open directory that's new in Lion. –  bmike Sep 15 '11 at 19:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.