In my experience, Mac OS X has largely been “UNIX Done Right™”, although there are quirks here and there, most of which one would never encounter in their day-to-day computer usage. One of those cases is changing a user’s shortname.
Let’s take a step back. Mac OS X allows users to sign in using either their full name (“Doug Stewart”, for instance) or their system-level short name (“dstewart”, for instance). The first is more newbie-friendly, while the second conserves keystrokes. You can easily edit the long name in the Accounts pane in System Preferences, but, by default, you can’t change the short name. OS X uses that short name for your home directory (/Users/[shortname]
, by default) and uses it in all of your NetInfo account information, as well as with your system password keychains.
So, what to do if you’ve incorrectly typed in a short name or simply want to change the name (for instance, I wanted to change the default Administrator account on a new box I set up to be “admin” instead of the goofy name I had given it)? Apple’s suggested procedure is cumbersome, lengthy and more than a little scary. Well, Mac geeks, fear no more! The author of Mac OS X Power Tools has written a handy app called ChangeShortName. Just download the .dmg, mount it, run the helper directly from the disk image, enter the short name you want to change and the name you want to change it to and then enter the administrator’s password. You’re done. Easy as pie.
One caveat: this obviously works best when 1) you’re not logged in as the user being renamed and 2) you don’t have a lot of data contained in the home directory of the account in question, as that can lengthen the process considerably.
5 Replies to “Mac OS X Geekage Of The Day”
Comments are closed.
Another trick is to be logged in on an account with administrator permissions, then
1) create a new user account in Preferences
2) delete the newly created home directory
3) rename the “offending” directory name (which is the same as the “short” name) .. from a Terminal window, this would look like:
sudo mv ~luser ~user
where you replace “luser” is the erroneous user name and “user” is the desired user name. This is much faster than copying the files…
3) run this command from terminal:
sudo chown -R user ~user
4) delete the old account in Preferences.
Hope this helps.
That works as long as you have a separate Admin account to log in with. If, as in my case, you misnamed your Admin account in the first place, the procedure you outline is a bit difficult to accomplish. It’s much UNIX-ier, though. *grin*
Nice Gravatar, by the way. Ahhh, the memories “333” brings back…