Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change your short username System
Someone asked me whether it was possible to change the short username in OS X. I knew it wasn't possible in the Login preferences panel (it's greyed out), but I thought NetInfo Manager should have a way to do this. In looking at the "Users" panel in NetInfo Manager, it seems like it would be a simple matter of changing all references from "oldshortname" to "newshortname". I did not, however wish to try this on my own machine (since it's working well!), so I went digging for some answers.

I found two interesting articles (one, two) on the MacNN forums which seem to describe the process fairly well. The essence of the solution seems to be:
  1. Login as root
  2. Rename the /Users/old_username folder to /Users/new_username
  3. Open NetInfo Manager and click on the lock to allow changes (enter admin password)
  4. Click on the "Users" column, and then edit any reference to "old_username" and replace it with "new_username"
  5. Click on the "Groups" column, and make sure "new_username" is in any of the same groups as "old_username". Wheel, in particular, will be an important group!
  6. Save the changes in NetInfo Manager and quit.
  7. Logout and login as the new 'shortuser' and see if everything works.
Please note that I have not tried this myself! Make sure you have a backup of your important user files before you start, just in case! If you know of a better way to do this, or have actually tried changing your short username, please let us know about it!
    •    
  • Currently 3.67 / 5
  You rated: 5 / 5 (3 votes cast)
 
[19,195 views]  

Change your short username | 10 comments | Create New Account
Click here to return to the 'Change your short username' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: Change your short username
Authored by: spdif on Nov 27, '01 12:17:20PM

I did this recently and it works just as desribed. I just logged in as root and then changed my user folder's name. Then I changed all references in NetInfo. The only gotcha I found is that for some reason, it denoted my renamed account to a non-admin status. So, I had to log back in as root and designate myself as an admin again.

-T



[ Reply to This | # ]
Re: Change your short username
Authored by: tacoboy on Apr 12, '02 10:40:43AM

Oh boy. So this worked for me too, sort of. I also had success changing my short name this way, and it did remove my Admin status. However, not only do I no longer have a user with Admin status, but my original Admin user can no longer do anything at all, like use System Preferences, or Internet Explorer. I have tried logging in as the root user into both the Terminal and Netinfo, but I am somehow denied access. I also tried logging in in single user mode and deleting the Netinfo database, forcing it to recreate itself, but I was unsuccessful there too.

Yes, I am in over my head and stuck. Any tips or words of encouragement???



[ Reply to This | # ]
Root user can't run NetInfo?
Authored by: robg on Apr 24, '02 02:44:48PM

So you logged in at the main screen as 'root' and you can't run NetInfo? What sort of errors are you getting when you try this?

-rob.



[ Reply to This | # ]
Files named after the user...
Authored by: gehn on Dec 03, '01 03:33:38PM

also try doing this in the terminal:

find /var -name "old_username"

if there are any files listed, you'll probably want to rename them to use your new username.



[ Reply to This | # ]
utility for changing user name
Authored by: mclbruce on Mar 22, '03 01:37:08AM

It would be great if someone could write a utility that took care of all of the steps involved changing a user name. Seems like AppleScript or AppleScript Studio could do the job. It would make it easier for me when one of my clients has an employee leave and a new hire takes their job.



[ Reply to This | # ]
Change your short username
Authored by: mcmark64 on Apr 27, '03 07:52:27PM
I recently changed the shortname for my account and found that I had to do the following:
  1. In NetInfo Manager:
    click on /users/oldname and then on the lock in the lower left corner
    change every occurance of oldname to newname in the property fields
    check all groups for occurances of oldname and change them to newname
    if this was an administrator account you will need to change the name in the admin group and in the wheel group, however, to change anything in the wheel group you must run NetInfo Manager as root, e.g., issue the following command from a terminal window:
    sudo /Applications/Utilities/NetInfo\ Manager.app/Contents/MacOS/NetInfo\ Manager
  2. rename the /Users/oldname directory to /Users/newname
  3. rename any configuration or preference files that have oldname in the filename; one that I found was ~/Library/Keychains/oldname
  4. many preference files (in ~/Library/Preferences/) will have paths in them that contain oldname; you can try to update these files, delete them or just leave them alone
So far everything seems to be working okay. Even my administrator priviledges remained intact. Your milage may vary.

-- McMark

[ Reply to This | # ]
Change your short username
Authored by: barnabas on Mar 16, '04 09:30:18AM

If you rename your Keychain file, you will also need to run the Keychain Tool to update the list of your keychains. You will need to remove the old file, add the new one, and make the new one your default.



[ Reply to This | # ]
Change your short username
Authored by: trevbuck on Apr 28, '03 07:23:24AM

Hey dudes
I changed my Father in laws shortname on his Titanium with
mixed success ... he still gets an annoying request for a
username & password everytime he checks his mail...other than
that...no problems...

I used the following method I found somewhere on these
forums:

First, double click on your hard drive, then Get Info on the /
Users folder. Click on the drop down arrow next to 'Ownership
& Permissions' Change the owner from System to your user
name. Enter your Administrator password in the dialog box.
Now double click on the Users folder. Click on your home
folder's name to highlight it. Change its name from your
current short name to your desired short name (lower case, no
spaces, 8 characters or less). Now go back to the Get Info
window on /Users and change the owner back to System.

Next, launch /Applications/Utilities/NetInfo Manager , click on
users in the middle pane, then click on your short user name in
the right pane. Click on the little lock button at the bottom of
the window and enter your Administrator password in the
dialog box. You want to change two items in the bottom pane:
name -- change from 'oldname' to 'newname'
home -- change from /Users/oldname to /Users/newname

In all cases, the three should agree (name & home in NetInfo
Manager, and your home folder in the Finder) -- they should all
bear the same name for the short user name.
That should do it. Click the lock again and quit NetInfo
Manager. Log out of the Finder and then log back in.

( I then had to log in as root & make it an admin account)

any ideas how I could get the annoying mail password request
from coming up?
(I'm thinking I should have changed every reference to his old
name to the new name in " Netinfo manager"...not just " name
" and " home")

regards

Trev Buckenara
Australia



[ Reply to This | # ]
Change your short username
Authored by: barnabas on Mar 16, '04 09:26:37AM

Did you rename your ~Library/Keychains/oldname file? Then run the Keychain Tool and add the new file to your keychains. Make the new file your default keychain, and remove the old one.



[ Reply to This | # ]
Change your short username
Authored by: bartender on Mar 24, '04 05:52:19PM

I made a small utility that makes it easier to change short names.

Accounts Enhancer
http://www.versiontracker.com/dyn/moreinfo/macosx/22889



[ Reply to This | # ]