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.

I have created an administrator account on a Mac OSX 10.5.8. At first, the user name and account name were called "kaleb". However, I later changed the name (is this account or user?) via System Preferences | Accounts to "apple2".

I now want this name to be consistent for everything related to this account. To try to do this, I followed the instructions at http://support.apple.com/kb/HT1428. However, this hasn't worked. I still can login as "kaleb" (and as "apple2"), and the name of my home folder is still "kaleb" although the user is called "apple2". On the command line, the username is "kaleb". However, in Systems Preferences there is only evidence of an "apple2" user.

What can I do to get rid of "kaleb" and have all permissions, pointers, names etc. under the name "apple2"?

share|improve this question
    
That KB article is worthless, as is the trick in the accounts pane to edit the short name in /Users since it doesn't work well in all cases for all OS. I understand why Apple doesn't tell people to delete an account and trust them to not hit return with the default choice or change the default choice when deleting an account. See below for the best solution. –  bmike Nov 14 '12 at 14:49
add comment

1 Answer

up vote 1 down vote accepted

You will need a third account to do this trick fully.

  1. Make an admin account named differently than the final short name you wish to have in the filesystem for /Users/apple2 (the desired "perfect user" with everything matching).
  2. Log in to the admin account and make one last backup of your system.
  3. Delete only the account you wish to keep - being careful to keep the home folders - do not let the system delete this home folder, just delete the account without changing the home folder.
  4. Open terminal and use this command exactly (unless you start with something other than kaleb and end with something other than apple2:

    sudo mv /Users/kaleb\ \(Deleted\)/ /Users/apple2

This command uses the \ character to escape the space and the parentheses so be careful to paste it exactly or [chat] here or elsewhere with someone that knows how the unix command line works if you have any doubt about how it will rename one folder by moving it.
You can really mess things up in terminal with sudo if you are not prepared to wipe everything and reinstall the OS and restore from a backup.

Now when you (re)create the apple2 user the OS will fix the ownership of the home folder and the short name will match the directory and the long name by making all three "apple2".

enter image description here

My process differs slightly from Apple's in HT1428: OS X: How to change user account name or home directory name in that they enable / disable the root user where I just make a new admin account. Apple has you rename the folder on the fly while logged in as root and then creates the new account - so your renamed account will get UID 502. I delete the account (but not the files) so that your renamed account gets UID 501. None of this really matters - you just want to have a backup in case either process fails you - both will get your short name and new account back in sync.

share|improve this answer
    
What does \(Deleted\)/ mean? I get the rest: is it not just sudo mv /Users/kaleb /Users/apple2? Thankyou. –  Kaleb Nov 15 '12 at 11:10
    
The system renamed the home folder when you delete the associated user account. So if my home folder was /Users/mike - when I delete it but leave the home folder alone, it gets renamed to /Users/mike (Deleted) - the / are to prevent the space and ( and ) from meaning something other than the characters they represent. –  bmike Nov 15 '12 at 11:51
add comment

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.