1

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.

3
  • Can 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?
    – Ramhound
    Apr 30, 2013 at 15:41
  • Thing 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.
    – qroberts
    Apr 30, 2013 at 15:43
  • You 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
    Apr 30, 2013 at 15:49

1 Answer 1

1

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.

4
  • Pretty much what I suggested just didn't have my equipment infront of me.
    – Ramhound
    Apr 30, 2013 at 15:53
  • OK 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.
    – qroberts
    Apr 30, 2013 at 16:03
  • thats why you log in as a different user
    – Keltari
    Apr 30, 2013 at 16:12
  • I 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.
    – qroberts
    May 3, 2013 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .