Windows – How to change the username and the userprofile path of a domain user

active-directoryuser-profilesusernamewindows 7

I have run into an issue with a piece of software we are using where users with a single quote ' in their name is causing the application to crash. I contacted support for the application and they said the only way to fix this is to remove or change the name of the affected users. (the software is using SQL and is obviously vulnerable to SQL injection and they still neglected my suggestions. It's internal so I am not overly concerned and it isn't housing anything important)

I currently have two users with a single quote ' in their name and I need to be able to change their username by removing it and I will also need to change their userprofile path on their local machines.

How do I go about renaming the user and moving the users current userprofile path to a new one while retaining all the content of it? I know how to rename the user but I am uncertain on the correct method of changing their userprofile path.

Best Answer

Within Active Directory Users and Computers you need to change the users names. Their names are listed on the "General" tab. Im not sure if you can even have an ' in the account name, but if you can - and its there you change that on the account tab. Since you say they have to change their profile path, I am assuming you can have an ' in the account name...

If you use Exchange, it should pick up the AD changes, but it wouldnt hurt to log into Exchange and make the changes to the user there as well.

As for the profile, thats an easy fix. While logged into their machine as another user (most likely you) rename their current profile. Easiest thing to do is add an underscore (_) in front of it. Log out and have them log in with their new account. This will create a new profile with the proper name. Once that is done, have them log out. Log in as you and copy the contents of the old profile to the new one. I would do a copy instead of move as a precaution, just in case something goes wrong. If it does, you can always undo all of the changes, including removing the underscore in fron of the old profile.

Related Question