Wednesday, May 5, 2010

How do I change my short username in Mac OS X 10.4 (Tiger) and Mac OS X 10.5 (Leopard)?

A. Changing the short username in Mac OS X 10.4 (Tiger)
ChangeShortName is an easy-to-use utility that helps to change the short name of a user's account in Mac OS X (versions 10.4.x and 10.3.x). It can also repair some problems that occur when a user has attempted to change their short username manually and done so incorrectly. For safety, it backs up the NetInfo database beforehand. Download and install it.
Download Now.

Please read the documentation for information about compatibility with Mac OS X 10.2.x; ChangeShortName has not been tested with Mac OS X Server and is not compatible with Mac OS X 10.5 Leopard.
How to use ChangeShortName:

You simply choose the account you wish to modify, provide the desired new short username, and then click a button; ChangeShortName does the rest.
ChangeShortName also includes protections that make using it much safer than trying to change your short username manually.
Leopard (Mac OS X 10.5) users: The current version of ChangeShortName is not compatible with Leopard due to significant changes Apple made to Leopard. However, the good news is that Apple has provided in Leopard tools for changing your short username yourself.

B. Changing the short username in Mac OS X 10.5 (Leopard)
While it's easy to change your full username—an easily-accessible setting in Accounts preferences—the short username, which is also the name of your home folder in the Finder, seems unmodifiable.
In Leopard unlike previous versions of the Mac OS, Apple has finally given users a reasonably simple way to change the short username, and it's located right in System Preferences. You have three options.
Before you begin, have always a good backup.

1. The simple approach: account aliases
Like an alias in the Finder, which refers to an original file, and essentially functions as that original file when accessed, an account alias refers to an actual account name, and functions as that account name when typed.
To create an account alias, follow these steps:
Step 1. Open the Accounts pane of System Preferences. (You can do so from within your own account or from another account; you just need administrative access.)
Step 2. If the lock icon in the lower-left of the Accounts window is “locked,” click on it and provide an administrative username and password; this allows you to make changes.
Step 3. In the list of accounts on the left, right-click (or Control-click) on the name of the account you want to modify and choose Advanced Options from the resulting menu.
Step 4. In the Advanced Options screen, click the plus (+) button under Aliases and then type your desired account alias. (Do not make any other changes.)
Step 5. Click on OK.
Restart your Mac just to be sure all of OS X’s services are aware of it. From now on, any time you’re asked for your username and password, you can type your account alias instead of your actual short username. You can even access your personal Web Sharing Web site using your account alias (for example, http://yourIPaddress/~alias).


2. The Advanced Options screen of Accounts preferences
The next step up in complexity is to actually change your short username, but to leave your home folder (in the Finder) alone. This would let you log in using the new short username, and any dialogs in which your short username is automatically filled would use the new name, but your home folder in the Finder will still reflect your original name.
One potential issue to be aware of here: Some programs may store settings or preferences based on your short username. If you change that name, you may find that particular programs, and possibly even some OS X services, exhibit minor issues after making the change. The solution is usually as simple as viewing the settings interface for the offending program or service and changing whatever setting is causing the problem.
Here are the steps to follow:
Step 1. If Automatic Login is enabled (in Accounts preferences) for the account you’re modifying, disable it. Similarly, if File Vault is enabled (in Security preferences), disable it. You can re-enable these features, if desired, after completing the procedure.
Step 2. Log in as a different user than the one you want to modify; make sure the account you want to modify is not logged in.
Step 3. Open the Accounts pane of System Preferences.
Step 4. If the lock icon in the lower-left of the Accounts window is “locked,” click on it and provide an administrative username and password; this allows you to make changes.
Step 5. In the list of accounts on the left, right-click (or Control-click) on the name of the account you want to modify; choose Advanced Options from the resulting menu.
Step 6. In the Advanced Options screen, delete your current short username in the Short Name field, and then type in your desired new short username. (Do not make any changes to the Home Directory field.)
Step 7. Click on OK and close System Preferences.
Step 8. Restart your Mac.
After restarting, your original short username will no longer be valid; you’ll need to use your new name exclusively. Mac OS X automatically updates any groups to which your account belongs, and changes the path to your personal Web Sharing directory (for example, http://yourIPaddress/~newusername).

3. Changing your short username and the name of your home folder
These instructions assume your home folder is located in /Users:
Step 1. If Automatic Login is enabled (in Accounts preferences) for the account you’re modifying, disable it. Similarly, if File Vault is enabled (in Security preferences), disable it. You can re-enable these features, if desired, after completing the procedure.
Step 2. Log in as a different user than the one you want to modify; make sure the account you want to modify is not logged in.
Step 3. Open the Accounts pane of System Preferences.
Step 4. If the lock icon in the lower-left of the Accounts window is “locked,” click on it and provide an administrative username and password; this allows you to make changes.
Step 5. In the list of accounts on the left, right-click (or Control-click) on the name of the account you want to modify; choose Advanced Options from the resulting menu.
Step 6. In the Advanced Options screen, delete your current short username in the Short Name field, and then type in your desired new short username.
Step 7. In the Home Directory field, change /Users/oldusername to /Users/newusername, where oldusername is your original short username and newusername is your new short username. Make note of the original and new paths.
Step 8. Click on OK and close System Preferences.
Step 9.Open Terminal (in /Applications/Utilities).
Step 10. Type the following command, all on one line, and then press Return; when prompted, provide the password of the admin account you’re currently using, and then press Return again:
sudo mv /Users/oldusername /Users/newusername
(These are the original and new Home Directory paths from Step 7; oldusername is your original short username and newusername is your new short username.) This step renames your home folder in the Finder.
Step 11. Restart your Mac.
After the restart, your short username is completely changed, at least as far as Mac OS X is concerned—both your account name and the name of your home folder in the Finder have been updated.

No comments:

Post a Comment