Changing Names

Products featured in Mac Gems are usually given a thorough evaluation and then awarded an appropriate mouse rating, but the topic of today’s article is an exception. As useful as I think it is, it gets no such rating, and for good reason: I wrote it (well, kind of, as I’ll explain below), so my ethics—and Macworld’s review policies—won’t let me give it those cute little mice. But it probably goes without saying that I think it’s cool.

 

As a Mac writer, one of the most frequent questions I get from users of Mac OS X is “How do I change my short username?” The question usually comes from people who chose a particular short username when they first started up their Mac under OS X but later decided that they wanted something different. It’s also common among those who’ve come into possession of a Mac previously owned by someone else—they’d rather have their own username than the previous owner’s.

I get this question so often because there doesn’t appear to be a way to make such a change. Apple makes it very easy to change your long username—generally your full name—via the Accounts pane of System Preferences. But if you try to change your short username—your official account name in Mac OS X, most easily identifiable as the name of your home user folder in /Users—you’ll find that field to be grayed out and inaccessible.

There are a number of good reasons Apple has made it difficult to change this name, the most important being that as your official Unix account name, changing it involves more than just typing a new name in a field; it requires changes in a number of places, in a number of important files, throughout the operating system. It’s probably better to just live with the current name (or to create a new account and use that one instead). But if you’re determined, you’re probably thinking “There’s got to be a way.” And there is. Unfortunately, figuring it out isn’t easy. Apple has a set of instructions; however, what those instructions are really doing is creating a new account, transferring your files from the existing account to the new one, and then deleting the existing account. This approach mostly works, but it’s a bit of a pain and it’s not really complete—a number of settings don’t get updated this way.

When working on my book, Mac OS X Power Tools , I decided that someone needed to come up with a thorough and accurate set of instructions for changing your short username...and it may as well be me. After finishing those instructions, I included them in the book and on the book’s website, but with nearly 20 steps, they weren’t exactly user-friendly. I figured there had to be a even better way, and decided to enlist the help of James Bucanek, the book’s technical editor and a Unix scripting expert, to take my manual procedure and turn it into a utility that could quickly and easily change a short username. James and I figured that we could take advantage of Mac OS X’s impressive scriptability to automate the procedure, and we figured correctly.

A lot of hard work from James resulted in the free ChangeShortName 1.1 , a Unix shell script and accompanying GUI helper application that lets anyone change their OS X short username with a minimum amount of fuss. If you’re a Unix geek, you can run the ChangeShortName shell script from within Terminal; if not, you’ll want to use the included ChangeShortName Helper utility. Double-click ChangeShortName Helper and you’ll be asked to choose the short username of the account to be changed, and then to type the new short username. If you want a new long username, you can include that, as well. (Leave the Repair box unchecked until you’ve read the documentation.)

 

ChangeShortName screenshot” WIDTH=

 

Click Run Script. Because changing the short username requires administrative access, a Terminal window will open and ask for your account password, after which you’ll see the script doing its thing. When it’s done, you’ll see a message stating, “ChangeShortName is now finished. You may now close this Terminal window.” That’s all there is to it! If the account that was changed is currently logged in, you’ll want to log out and then back in so that the Finder can reconcile the new folder and file path names, but the rest is taken care of.

ChangeShortName has been available for a few months now and the feedback from users has been overwhelmingly positive. It’s especially useful for IT staff and lab managers, who tend to change account usernames frequently. We’ve also gotten a good number of “thank yous” from users who originally gave themselves a “short” username such as MrBobDobalina but got tired of typing it whenever they needed to enter their name and password; Bob is a heck of a lot easier to type.

Now before you rush off to download ChangeShortName and start changing all your usernames, a warning is in order: Changing the short username is a serious procedure that involves the modification of some serious system files. Because of this, as mentioned above, the safest option is to simply learn to live with your present short username or, if the account was just created, to create a new account with the desired short username and then delete the unwanted account. However, if you’re still determined to change your short username, ChangeShortName can help. Just be sure to read the ReadMe file that comes with it. That document provides much more information on the procedure and is required reading.

Subscribe to the Help Desk Newsletter

Comments