How do I change the username and the userprofile path of a domain user?
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 videos on Youtube
qroberts
Updated on September 18, 2022Comments
-
qroberts over 1 year
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.
-
Ramhound almost 11 yearsCan you simple just create 2 new users and transfer the data within those profiles by hand? What domain level tools do you have access too?
-
qroberts almost 11 yearsThing is if I create new users their SID/GUID will change and they will lose any access given to them via NTFS and shares. As for tools, I have the basic stuff. I am willing to download anything free if available. I'd almost prefer to do this manually as it is only two users.
-
Ramhound almost 11 yearsYou can simply give those new users access to the shares. You can set the ownership of the old profile folders yourself since your a domain administrator. You might be able just rename the profiles but the local profile directory won't be used. You can do this: support.microsoft.com/kb/242067 just ignore the part where it says your migrating to another domain or just do this: windows.microsoft.com/en-us/windows7/…
-
-
Ramhound almost 11 yearsPretty much what I suggested just didn't have my equipment infront of me.
-
qroberts almost 11 yearsOK thanks, this makes sense and sounds like something I would do. IIRC won't Windows get mad if I try to rename the userprofile folder? I believe it says something about NTUSER.dat is in use.
-
Keltari almost 11 yearsthats why you log in as a different user
-
qroberts almost 11 yearsI tried this and when I logged in as the user with the name change applied, it created a 'TEMP' userprofile folder that got deleted upon logging out. So I opened regedit and changed every reference of the old username to the new and logged in again. Worked fine after that.