Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Changing user names in AD,

  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing user names in AD,

    We are doing a project where we are taking all of the older names in AD that are composed of someone's initials instead of the first name and last name and changing them to the first name and last name. Well on the local machine(XP) the local profile is still named the initials of the person but when the user logs in with their new name it picks up the old profile and uses it but it doesn't change the name of the old profile. So the local profile on the machine stays the initials and the user only sees that their network login has changed. Now this presents a problem because the Technicians in my organization when they trouble shoot space issues on a pc or if a user has a corrupted profile and they look in documents and settings and don't see a profile that matches the users name they will start deleteing profiles. Is there a tool out there that will change the name of the local profile of the machine for me so that it matches the name and SID of the name in AD? I know this is a longshot but I had to try. Thanks

  • #2
    Re: Changing user names in AD,

    Another one of my pet peeves with Windows... changing the username doesn't change the locally stored profile folder name. Most frequently I run into this when renaming local administrator accounts which is a best practice.

    If you do find a tool, let us know so we can share.
    VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+ - VMware Virtualization Evangelist
    My advice has no warranties. Follow at your own risk.


    • #3
      Re: Changing user names in AD,

      Originally posted by jasonboche View Post
      ...I run into this when renaming local administrator accounts which is a best practice...
      Only if you change the name after actually logging on to the machine with it. If you're changing the name remoting it won't matter. Once you log on the appropriate folders are created.

      If you change the user's name in AD you can change the profile in the registry to point to the old folders. You'll need to first logon and then off with the changed name, then alter the reg keys. It's a hack but it does work.

      [Log on locally with an admin account or edit the registry remotely with no one logged on]
      Navigate to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList and locate your SID by inspecting each ProfileImagePath. Find the one pointing to the new username and change it to the old username folders. Don't forget to grant full permission to the key/subkeys to the new username.
      Last edited by ahinson; 3rd May 2007, 15:58.

      ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **


      • #4
        Re: Changing user names in AD,

        Actually in Windows XP the local profile with the old name automatically maps to the changed name. So there is no need to hack the registry. What I'm looking for is a tool or something to change the local profile name to the new name so that my techs don't have to touch every single machine.


        • #5
          Re: Changing user names in AD,

          I've done this when we did some renaming on our network (we don't have many users so it wasn't a major impact!)

          It was a dirty fix and I'm not sure how it'll affect you if you have lots of computers to sort out.

          - Reboot the PC so that all NTUser.dat files aren't locked in any profile.
          - Log on as a local or domain administrator.
          - Goto c:\documents and settings.
          - Copy each profile folder that needs to have the name changed. paste so you get "Copy of x" where x = the username.
          - Rename this "copy" to the new username.
          - Rename the old profile {username}.old
          - Do this for each user who has a profile that needs renaming.

          As has been suggested by ahinson, you do need to check the registry. As they have already told you, navigate to : HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

          Click the + to the side so it expands all the SIDs. Now check each one for the profileimagepath to be the old username folder. Change this to the new username folder you just created.
          change c:\documents and settings\jsmith to c:\documents and settings\JohnSmith

          - Do this for each user that needs changing on this PC.

          - move onto the next PC )

          ....this is a long and windy approach if you have lots of users that need changing. Out of our 110 users I only changed 20, and each one of them has their own PC so I was only changing 1 account on each of the 20 PC's.

          Good luck, hope that can help ya.