Unfortunately, as simple as one might think it should be, it is not trivial to do. Here's another way:
Apple's support article HT1428: OS X: How to change user account name or home directory name, still refers to the old and buggy support article HT1528: Enabling and using the "root" user in Mac OS X. No one should ever need to enable the root user. This procedure is overly complex and buggy. If you really and truly need to act as the root user, use the Terminal and run the "sudo" command.
Here is a better procedure for changing a user account short name that does not require the root user:
- Create a new Administrator account
- Log in as the new Administrator account
- Run Terminal.app and enter the following commands:
cd /Users
sudo mv oldshortname newshortname
Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
- Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
- Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
- Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to delete the old user
- Choose Log Out from the Apple menu.
- Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
- After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
I think this method is even easier:
How to Create a New User Account if You Cannot Access Your Admin Account
Reboot the computer. At the chime press and hold down the COMMAND-S keys to start into Single-user Mode.
You will boot to a black screen with scrolling white text, release the keys and wait for it finish.
Enter the following lines at the command prompt pressing RETURN after each:
mount -uw /
rm /var/db/.applesetupdone
reboot
After you reboot the computer you will be taken to the Setup Assistant. When you get to the point where you are asked to setup your new user account, create a new admin account. Be sure to name this user account something different than the admin user account that already exists on the system. When you finish the Setup Assistant, it will automatically log you into the new account.
You can transfer your files from the old account to the new one. See: Transferring files from one User Account to another. Once you have moved all your files into your new account, you can delete the old account using Accounts or Users & Groups preferences.