Skip navigation

how do I rename my account name in mountain lion

47439 Views 51 Replies Latest reply: Aug 29, 2013 8:43 PM by LongRiver RSS
  • baltwo Level 9 Level 9 (59,180 points)

    If a new machine and you didn't migrate on first boot, then I strongly suggest starting over by booting into recovery mode, wiping the HD, restoring the OS, and on first boot using the Setup Assistant to migrate from the old computer. Details inPondini's Setup New Mac guide.

    27" i7 iMac SL, Lion, OS X Mountain Lion (10.8.2), G4 450 MP w/Leopard, 9.2.2
  • coocooforcocoapuffs Level 3 Level 3 (845 points)
    Currently Being Moderated
    Oct 10, 2012 7:09 PM (in response to baltwo)

    maybe I should not have jumped into this thread. This is an old machine with username {space} 1. I just want to change that to newusername. Using the KB http://support.apple.com/kb/HT1428 here won't work, must be the space. If I can fix that, I am golden.

  • baltwo Level 9 Level 9 (59,180 points)
    27" i7 iMac SL, Lion, OS X Mountain Lion (10.8.2), G4 450 MP w/Leopard, 9.2.2
  • coocooforcocoapuffs Level 3 Level 3 (845 points)
    Currently Being Moderated
    Oct 10, 2012 8:19 PM (in response to baltwo)

    But, from etresoft: Keep in mind that both oldshortname and newshortname must be all lowercase, with no spaces, and only contain letters or numbers.

     

    So, I am assuming this won't work, as there is a space in the oldshortname. This seems to be an unaddressed OSX bug, even thought a home folder name with a space is probally caused by user foolishness...


  • baltwo Level 9 Level 9 (59,180 points)

    All I can suggest is to try it and see if you can use quotes around it. Other than that, you're on your own.

    27" i7 iMac SL, Lion, OS X Mountain Lion (10.8.2), G4 450 MP w/Leopard, 9.2.2
  • Wotsisname Calculating status...
    Currently Being Moderated
    Oct 15, 2012 12:14 PM (in response to etresoft)

    Hi etresoft,

    I tried to change my home directory name following your steps using Terminal with the 'sudo' command and currently have lost all my files.

    Confession time - and this might be where I've gone wrong - I did not delete the old user name as you instructed in step 6. I was too nervous in case I lost all my documents. I had just migrated them from a backup onto a new macbook, then deleted the backup (I know stupid but I wanted to make space to start a new load of backups) - so now the only place all my documents exist is in my the new macbook - and I can't see them at all! Please help.

    When I logged in as the new user, there was no 'home' icon, nor is there a home icon in any of the other user profiles, including the original user, which I hadn't deleted. And all my documents have disappeared. Applications are present but not in the bar at the bottom, only in the apps folder. Is this making sense?

    Is there a solution or have I messed everything up? I guess its a case of pointing the computer to the right place. I too scared to delete the original user in case I actually delete all my docs, which as mentioned are not backed up anywhere else anymore.

    Confession 2 - I also changed the name twice on terminal before I created my new profile... would that make a difference?

    please tell me I haven't made a terminal (excuse pun) error.

    Best,

    Jules

  • Tony W Calculating status...
    Currently Being Moderated
    Oct 30, 2012 10:01 PM (in response to etresoft)

    I have only one account on my Mac. I used etresoft's method to change the account name, but I ran into some problems:

     

    - Many apps "forgot" their preferences.

     

    - Folders and files I had created in places outside the old home folder now have permissions issues becuase they are still "owned" by the old account.

     

    Is there any way to change the account name without losing the prefs and still retain ownership of all the files and folders outside the home folder?

  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Oct 31, 2012 4:30 AM (in response to Tony W)

    Tony W wrote:

     

    I have only one account on my Mac. I used etresoft's method to change the account name, but I ran into some problems:

     

    - Many apps "forgot" their preferences.

     

    - Folders and files I had created in places outside the old home folder now have permissions issues becuase they are still "owned" by the old account.

     

    Is there any way to change the account name without losing the prefs and still retain ownership of all the files and folders outside the home folder?

    It isn't my method, it is Apple's method where I suggest typing two lines in the terminal instead of enabling and disabling the root user.

     

    Nothing about that process should change any permissions or ownership. Those are managed by the user ID, not the user name. Some poorly written applications could misbehave - too bad for them.

     

    The only other possibility of failure would be with managed accounts. I have updated my user tip to caution people with managed accounts to contact their system administrator instead.

  • Tony W Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 31, 2012 5:53 AM (in response to etresoft)

    Some of the apps that misbehaved (lost their prefs) were Dropbox, BBEdit, Little Snitch and 1Password. I can't live without any of them.

     

    Here's an example of what I mean by permissions/ownership problems. Some of my apps live in folders inside the Applications folder. Most of them still worked fine after making the name change (Microsoft Office, Utilities, Toast Titanium, a few games, etc.), but some of these folders became inaccessible showing the little red "no access" icon.

     

    I went back to my original name and everything is back to normal. The only reason I wanted to change it is because it contains an illegal underscore character that some apps complain about, and it seems to cause a lot of entries in the console logs (mostly from sandboxd complaining about "deny file-read-data" or "deny file-write-create"). But it's not serious so I can live with it.

  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Oct 31, 2012 9:38 AM (in response to Tony W)

    I cannot reproducate anything you are describing. The underscore character is not illegal. Sandbox error messages are not uncommon.

  • Tony W Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 31, 2012 2:44 PM (in response to etresoft)

    Is the underscore really a valid shortname character? According to the instructions for changing the name: "Keep in mind that both oldshortname and newshortname must be all lowercase, with no spaces, and only contain letters or numbers." And according to AgileBits (makers of 1Password): "Your OS X user account has an invalid shortname. Short names can only contain lowercase letters and an invalid shortname can cause many different problems with 1Password."

     

    I have run into occasional quirks with 1Password, and AgileBits has told me they might be caused by the shortname. That's what got me started down this path of attempting to change it.

  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Oct 31, 2012 4:23 PM (in response to Tony W)

    Tony W wrote:

     

    Is the underscore really a valid shortname character? According to the instructions for changing the name: "Keep in mind that both oldshortname and newshortname must be all lowercase, with no spaces, and only contain letters or numbers."

     

    I've already established that those instructions are junk

     

    Obviously you can use underscores. Whoever wrote the support article for Lion Server knows that.

     

    And according to AgileBits (makers of 1Password): "Your OS X user account has an invalid shortname. Short names can only contain lowercase letters and an invalid shortname can cause many different problems with 1Password."

     

    I have run into occasional quirks with 1Password, and AgileBits has told me they might be caused by the shortname. That's what got me started down this path of attempting to change it.

    I wouldn't trust my passwords to any software that couldn't handle an underscore.

  • Tony W Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 31, 2012 7:23 PM (in response to etresoft)

    If the instructions are junk, why do post a link to them? It is your own "better procedure" (https://discussions.apple.com/docs/DOC-3872) that contains the line about using only letters and numbers.

     

    And I would be more apt to trust a company that has flawlessly handled my passwords securely over the past 2 years than one that can't even manage to post proper instructions for its own operating system.

     

    I'll just live with it the way it is. Thanks.

  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Oct 31, 2012 7:28 PM (in response to Tony W)

    Tony W wrote:

     

    If the instructions are junk, why do post a link to them? It is your own "better procedure" (https://discussions.apple.com/docs/DOC-3872) that contains the line about using only letters and numbers.

    It is more a citation than a link meant to support.

     

    And I would be more apt to trust a company that has flawlessly handled my passwords securely over the past 2 years than one that can't even manage to post proper instructions for its own operating system.

     

    I'll just live with it the way it is. Thanks.

    In Apple's defense, having an underscore in a short user name is not commonly done. It isn't illegal but it isn't convention either.There is nothing about "_" that should break anything. It is commonly used as a substitute for some other (possibly whitespace) character that could break something.

  • tariqmc Calculating status...
    Currently Being Moderated
    Nov 14, 2012 1:58 AM (in response to etresoft)

    One way to change a short name is to create a completely new user with the short name and full name you want.  Then copy your document to the new user by using a external drive or dropbox or some other method.  Then log into the new user and copy across your docs.  You will have to confirgure and possibly install some software but it is probably the safest way to get a new short name and full name.  I have an old short name I don't really want and I'm concerned it is causing some problems in my network.  I have looked at all the options here but for my situation I think I'll just start with a new user.  I'll keep the old user for a while and when I'm comfortable I'll delete the old one.

     

    Hope that makes sense.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.