Changing the Account Name on Mac OS X 10.6

BACKUP! The first thing to do before messing around with user folders is to back up.

 

Make sure you have a good current working backup before doing the following. You're not actually going to delete anything, but you are going to use the command line which doesn't have an undo so be careful.

 

In this example we are changing the Account Name from jonny to bobby.

1. In the Accounts pane of System Preferences make a new user by clicking on 

Call them whatever you want, but make them an admin user.

 

2. Log out as you and log in as the new admin user.

 

3. In the Accounts part of System Preferences select the user to rename and press  as if you are deleting them. When asked what you want to do with the users data choose "Don't change the home folder" This will rename the folder by adding (Deleted) to the name.

 

4. Open Terminal and type

sudo mv /Users/jonny\ \(Deleted\) /Users/bobby

 

Obviously replacing the names with the correct ones - spaces and slashes in the above are important. Make sure the new name is all standard characters (a-z 0-9) with no spaces

 

The sudo bit runs the command as the root user so you will be asked to enter a password, any Admin users password will do. As you type the characters won't appear on the screen, its a security thing.

 

You should now have a folder in the Users folder with the right name. Check the name is correct before you carry on. If you mistyped it then use the mv command again.

 

6. In the Accounts part of System Preferences make a new user by clicking on 

 

7. Enter the details for the new user making sure the Account name is exactly the same as the folder name you just used for the new user name.

 

8. When you click OK the computer will see that a folder already exists for the user and will ask if you want to use that folder for the home. Click OK - if you don't get this window then you've got the name wrong, you'll need to delete the users you've created and try again.

9. You can now log in as the renamed user.

 

When you log in a dialog box will appear saying the the system was unable to unlock your login keychain. The keychain stores passwords and other information, when you log in it will need to have its password updated to work with the new account. 

Click the button that says Update Keychain Password and enter the old account password. The keychain will be updated and will now use the new account password to unlock.

 

It is also worth running Disk Utility and clicking the Repair Disk Permissions button as some folder permissions especially your public and sites folders might not be correct.

 

That's pretty much it… good luck!

 

 

1 comment

benjamin wrote 7 years 18 weeks ago

In addition to the above

Some interesting discussion on this process here
http://www.macosxhints.com/article.php?story=20090831093941225

It also points to a bit of software which adds a keystroke to the system called LockTight
http://www.gkoya.com/2006/11/23/locktight-for-mac-os-x-intel
 
Another good article with plenty of comments is here...
http://artofgeek.com/2009/09/08/lock-your-macs-screen-like-in-windows-snow-leopard-edition