What links User ID with user's Documents folder?

G

Guest

I've been wondering, just what links a user ID with the documents folder. I
know the folders are created under the Documents and Settings folder when a
new User ID, is first created. If viewed from an Administrator's account, it
shows up with the name used when the ID was created. But if the account is
renamed, the folder names don't change. Yet they still work. The link must
be stored somewhere.

Also, the folders don't go away if the account is deleted. If it were
re-created with the same name, would it latch onto those folders, or destroy
them? Should you rename the folders first, re-create the account, then copy
the files back?

If you renamed an account, and manually renamed the folders to match, would
they still work?

-Leon
 
M

Malke

Leon said:
I've been wondering, just what links a user ID with the documents folder. I
know the folders are created under the Documents and Settings folder when a
new User ID, is first created. If viewed from an Administrator's account, it
shows up with the name used when the ID was created. But if the account is
renamed, the folder names don't change. Yet they still work. The link must
be stored somewhere.

Also, the folders don't go away if the account is deleted. If it were
re-created with the same name, would it latch onto those folders, or destroy
them? Should you rename the folders first, re-create the account, then copy
the files back?

If you renamed an account, and manually renamed the folders to match, would
they still work?

There is no "link" as such. Your interpretation of what is happening is
not correct. Each user account has a unique ID. When you change a user
account name, it is a cosmetic change only and does not change the
underlying folders. They work because the account itself has not changed
at all. It is not a new account. To make a name change, the correct way
is to create a new account with the desired name and then copy the
original account's settings/data to the new one. You need to log into
the new account once before you can copy anything to it.

If you delete the account, the folders *do* "go away" if you choose to
delete the files when you delete the account from the User Accounts
applet. The only account that cannot be deleted is the built-in
Administrator account.

Copy a User Account - http://support.microsoft.com/default.aspx?kbid=811151
HOW TO Create and Configure User Accounts in Windows XP -
http://support.microsoft.com/default.aspx?scid=kb;en-us;279783
User Accounts overview (MS) - http://tinyurl.com/kogeq


Malke
 
W

Wesley Vogel

I've been wondering, just what links a user ID with the documents folder.

The SID number. Security identifiers (SIDs) are numeric values that
identify a user or
group. An SID looks something like this
S-1-5-21-1957994488-746137067-839522115-1003.

This registry key lists all of the SIDs.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\ProfileList

To tell which user has which SID, click on each SID, look at
ProfileImagePath, the Data has the user name at the end of the path.
For example, %SystemDrive%\Documents and Settings\UserName

%userprofile%\NTUSER.DAT is the HKEY_CURRENT_USER registry hive for that
user.

<quote>
Profile Names and Storage in the Registry
Windows NT 4.0 records which profile should be used by which user by placing
registry keys for the user's security ID (SID) in the registry in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \Windows NT\CurrentVersion\ProfileList

Each user who has logged on to the local machine will have a SID recorded
here in a subkey, with a value that contains the path to that user's local
profile, ProfileImagePath. Should multiple users with the same account name
log on to the network, separate distinct profiles are created for each. For
example, if multiple users with the account name John Smith log on to the
computer, the first John Smith is assigned a folder named JohnSmith.
Subsequent users with the same name are assigned folders named JohnSmith
with a numerical suffix appended, for example JohnSmith.000, JohnSmith.001,
and so forth.
<quote>
Guide to MS Windows NT 4.0 Profiles and Policies
http://www.microsoft.com/technet/archive/winntas/maintain/prof_pol.mspx?mfr=true

If your hard drive is formatted NTFS, your Recycle Bin is listed by your
SID. For example, C:\RECYCLER\S-1-5-21-1957994488-746137067-839522115-1003
Also, the folders don't go away if the account is deleted.

When you delete an account you are given an option to keep or delete the
user's folders.
If you renamed an account, and manually renamed the folders to match,
would they still work?

Not quite that easy, you have to change the path to match the SID number.

How to rename or move a User Profile folder
http://windowsxp.mvps.org/userpath.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

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