How to "relink" a user's profile folder to a new account/SID?

R

Robert

I'm trying to rename an account and have its associated profile folder name
match. I know how to rename the account. And, I understand the relationship
between the account name, the profile name (created at the first login of a
new account) and the associated SID. But, how do you "rename" a user profile
folder so it matches the newly-named account?
Here's what I've tried thus far:

First, I changed the account name in Control Panel\User Accounts. And when I
logged out, the new account name appeared in place of the original name on
the Windows Login screen. But, when I logged in again, the account's folder
name (under C:\Documents and Settings) remained unchanged. Apparently,
changing the account name doesn't alter the profile name associated with that
account's SID.

Next, I changed the profile folder name using the Rename function in Windows
Explorer. (I'm surprised I didn't get an error message saying the file cannot
be deleted.) Then, I created a NEW profile folder with the desired name (via
File\New\Folder). And, I copied the original profile folder's contents to the
newly-created folder.

But, when I logged out and back in again using the new account name, I was
surprised that Windows recreated a user profile with the SAME folder name as
the original profile folder, the one I had changed. Rather than use the
information in the new profile folder as I had hoped, Windows forced the
login using the original profile name, even if it had to create a second one.


Please clarify/explain these three concepts:

1. Its my understanding that what's created in the Control Panel are User
Accounts. And, what appears under C:\Documents and Settings are users'
"Profile Folders". I've read that the two are connected by a Security ID
(SID). Why are User Account names and Profiles separate entities?

2. When you create a NEW User Account, that account name appears in the
Windows Login screen. But, changing the User Account name doesn't change the
Profile Folder's name to match? How do you change the profile folder name to
match the modified account name?

3. When I log in with an Administrator account and try to delete a different
user's Profile Folder, I get the following error message, "<username> is a
Windows system folder and is required for Windows to run properly. It cannot
be deleted." I understand that if I delete an account in Control Panel\User
Accounts, I will not be able to re-use that account name again. (Apparently,
deleting an account doesn't delete its associated SID.) And, I've read you
can delete a user's Profile Folder in Safe Mode. Is this true? Or, will the
remaining SID force another profile folder to be created with its attached
(original) folder name as I experienced previously?

Thanks for any infomation you can provide. A lot of people seem to be having
a similar problem, and there's several different opinions in these Forums
about what's the right answer. I'm becoming quite frustrated
with it all. It would be great if Microsoft posted a KB article to clear
this up!

-Robert
 
P

Pegasus \(MVP\)

Robert said:
I'm trying to rename an account and have its associated profile folder
name
match. I know how to rename the account. And, I understand the
relationship
between the account name, the profile name (created at the first login of
a
new account) and the associated SID. But, how do you "rename" a user
profile
folder so it matches the newly-named account?
Here's what I've tried thus far:

First, I changed the account name in Control Panel\User Accounts. And when
I
logged out, the new account name appeared in place of the original name on
the Windows Login screen. But, when I logged in again, the account's
folder
name (under C:\Documents and Settings) remained unchanged. Apparently,
changing the account name doesn't alter the profile name associated with
that
account's SID.

Next, I changed the profile folder name using the Rename function in
Windows
Explorer. (I'm surprised I didn't get an error message saying the file
cannot
be deleted.) Then, I created a NEW profile folder with the desired name
(via
File\New\Folder). And, I copied the original profile folder's contents to
the
newly-created folder.

But, when I logged out and back in again using the new account name, I was
surprised that Windows recreated a user profile with the SAME folder name
as
the original profile folder, the one I had changed. Rather than use the
information in the new profile folder as I had hoped, Windows forced the
login using the original profile name, even if it had to create a second
one.


Please clarify/explain these three concepts:

1. Its my understanding that what's created in the Control Panel are User
Accounts. And, what appears under C:\Documents and Settings are users'
"Profile Folders". I've read that the two are connected by a Security ID
(SID). Why are User Account names and Profiles separate entities?
*** Your "account" is an entry in the SAM database. It defines your name,
password and status (e.g. User or Administrator. You can compare it to your
entry in a company's staff register: "Robert, Maintenance Manager".
Your "profile folder" is a collection of folders, files and settings. It
remembers the environment you work in. You can compare it to your desk: Its
location, size, telephone, PC. You can have an account without a profile
folder, same as you can be employed by a company without having a desk (and
maybe draw a salary without working . . .)
2. When you create a NEW User Account, that account name appears in the
Windows Login screen. But, changing the User Account name doesn't change
the
Profile Folder's name to match? How do you change the profile folder name
to
match the modified account name?
*** See below.
3. When I log in with an Administrator account and try to delete a
different
user's Profile Folder, I get the following error message, "<username> is a
Windows system folder and is required for Windows to run properly. It
cannot
be deleted." I understand that if I delete an account in Control
Panel\User
Accounts, I will not be able to re-use that account name again.
(Apparently,
deleting an account doesn't delete its associated SID.) And, I've read you
can delete a user's Profile Folder in Safe Mode. Is this true? Or, will
the
remaining SID force another profile folder to be created with its attached
(original) folder name as I experienced previously?
*** When you reboot a machine and log on as Administrator then you can
delete all user profile folders, other than your own.
Thanks for any infomation you can provide. A lot of people seem to be
having
a similar problem, and there's several different opinions in these Forums
about what's the right answer. I'm becoming quite frustrated
with it all. It would be great if Microsoft posted a KB article to clear
this up!

-Robert

There are two ways to re-link a given profile folder with an account:

a) By using a "substitution racket". This method replaces a user's unwanted
profile folder with the correct folder. This method does not involve any
registry changes and is therefore completely safe and fully reversible. Here
is an example of someone who did it successfully:
http://forums.techarena.in/window-2000-help/1073870.htm

b) By changing the registry entry that points to a user's profile folder.
1. Log on as Administrator.
2. Navigate to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
3. Locate the "incorrect" profile name in the "ProfileImagePath" key.
4. Adjust it to the "correct" folder name.
5. Reboot and log on as the problem user.
Because this method involves changing the registry, you run the usual risks
associated with registry changes. Unless you back up the key you modify, the
change is not reversible. If you mistype the folder name then you will cause
a new profile folder to be created at the next logon.
 
R

Robert

First, I renamed the misspelled user account in Control Panel\User Accounts.
And, the "new" name now appears in the Windows Login screen. But, when I
logged in with the new name, Windows created an entirely different user
account and profile, complete with new Profile Folder.

Since, the "new" account name was not linked to the original Profile Folder
as I'd hoped, I tried to simply rename the misspelled Profile Folder to match
the newly-spelled account name. But, I got the following error message on the
attempt; "<username> is a Windows system folder and is required for Windows
to run properly. It cannot be deleted." [I've since resolved that problem by
booting into Safe Mode first, as you suggested.]

Next, I copied the contents of the original (misspelled) Profile Folder to
the new (correctly-spelled) Profile Folder. And, I tried to relink the SID
from the original user account to the new (correctly-spelled) Profile Folder
by using the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList\ProfileImagePath" key that you suggested. I was
able to successfully re-link the original account's SID to the new Profile
Folder.

After rebooting, I logged into the computer in Normal Mode using the "new"
username. And, the user now has access to their original account data which
I'd copied from the old Profile Folder. The Set command confirms that this
user's account is in fact linked to their new (correctly-spelled) profile.

Then, I tried to delete the old misspelled Profile Folder. I logged in as
the default (original) Administrator in Safe Mode again and successfully
deleted the misspelled folder. But, when I log back in Normal Mode (as a
secondary Administrator, since the primary Admin. account is not accessible
in Normal Mode in XPHome), the old Profile Folder was still there. Its also
still visible in all of the Limited user accounts. [Note: I'm sure its not a
new Profile Folder with the old name because it contains only two folders,
the remnants of my previous attempts to delete the old folder.]

I'm perplexed, and unable to figure out why the old folder still appears in
ANY of the user accounts when it remains deleted in the Admin. account in
Safe Mode!?! Why is it still there and how do I delete it PERMANENTLY from
all accounts???

Thanks for your continued assistance,
-Robert
 
P

Pegasus \(MVP\)

I always have a problem when someone reports that he deleted a folder and
that it reappeared by sheer magic after the next boot (unless his machine
uses roaming profiles in a corporate environment). My recommendation is
invariably to grab this bull by the horns. So far nobody has reported what
REALLY happened when he did.

Anyway, this is how you grab the bull by the horns:
1. Reboot into Safe Mode and log on as Administrator.
2. Delete the unwanted profile folder.
3. Create a file of **exactly** the same name as the unwanted folder. You
can do it like so:
- Click Start / Run / cmd {OK}
- Type this command:
cd > "c:\Documents and Settings\{FolderName}"
(Replace {FolderName} with the name of the folder you deleted in Step
2
If you really deleted the folder in Step 2 then you will succeed in Step 3.
Furthermore, nothing will recreate the unwanted folder while your file
is in place.

On the other hand: If you only thought that you deleted the folder in
Step 2 then Step 3 will tell you so in no uncertain terms.

The result should be interesting.


Robert said:
First, I renamed the misspelled user account in Control Panel\User
Accounts.
And, the "new" name now appears in the Windows Login screen. But, when I
logged in with the new name, Windows created an entirely different user
account and profile, complete with new Profile Folder.

Since, the "new" account name was not linked to the original Profile
Folder
as I'd hoped, I tried to simply rename the misspelled Profile Folder to
match
the newly-spelled account name. But, I got the following error message on
the
attempt; "<username> is a Windows system folder and is required for
Windows
to run properly. It cannot be deleted." [I've since resolved that problem
by
booting into Safe Mode first, as you suggested.]

Next, I copied the contents of the original (misspelled) Profile Folder to
the new (correctly-spelled) Profile Folder. And, I tried to relink the SID
from the original user account to the new (correctly-spelled) Profile
Folder
by using the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList\ProfileImagePath" key that you suggested. I
was
able to successfully re-link the original account's SID to the new Profile
Folder.

After rebooting, I logged into the computer in Normal Mode using the "new"
username. And, the user now has access to their original account data
which
I'd copied from the old Profile Folder. The Set command confirms that
this
user's account is in fact linked to their new (correctly-spelled) profile.

Then, I tried to delete the old misspelled Profile Folder. I logged in as
the default (original) Administrator in Safe Mode again and successfully
deleted the misspelled folder. But, when I log back in Normal Mode (as a
secondary Administrator, since the primary Admin. account is not
accessible
in Normal Mode in XPHome), the old Profile Folder was still there. Its
also
still visible in all of the Limited user accounts. [Note: I'm sure its not
a
new Profile Folder with the old name because it contains only two folders,
the remnants of my previous attempts to delete the old folder.]

I'm perplexed, and unable to figure out why the old folder still appears
in
ANY of the user accounts when it remains deleted in the Admin. account in
Safe Mode!?! Why is it still there and how do I delete it PERMANENTLY from
all accounts???

Thanks for your continued assistance,
-Robert











Pegasus (MVP) said:
*** Your "account" is an entry in the SAM database. It defines your name,
password and status (e.g. User or Administrator. You can compare it to
your
entry in a company's staff register: "Robert, Maintenance Manager".
Your "profile folder" is a collection of folders, files and settings. It
remembers the environment you work in. You can compare it to your desk:
Its
location, size, telephone, PC. You can have an account without a profile
folder, same as you can be employed by a company without having a desk
(and
maybe draw a salary without working . . .)

*** See below.

*** When you reboot a machine and log on as Administrator then you can
delete all user profile folders, other than your own.


There are two ways to re-link a given profile folder with an account:

a) By using a "substitution racket". This method replaces a user's
unwanted
profile folder with the correct folder. This method does not involve any
registry changes and is therefore completely safe and fully reversible.
Here
is an example of someone who did it successfully:
http://forums.techarena.in/window-2000-help/1073870.htm

b) By changing the registry entry that points to a user's profile folder.
1. Log on as Administrator.
2. Navigate to HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList
3. Locate the "incorrect" profile name in the "ProfileImagePath" key.
4. Adjust it to the "correct" folder name.
5. Reboot and log on as the problem user.
Because this method involves changing the registry, you run the usual
risks
associated with registry changes. Unless you back up the key you modify,
the
change is not reversible. If you mistype the folder name then you will
cause
a new profile folder to be created at the next logon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top