09 August, 2011

User Profile Algos

"User Profile Algos - What Happens In The Background When A User Logs On"

Local Profile - New User

1. The User Logs On

2. The Operating System checks the list of User Profiles located in HKLM\Software\Microsoft\WinNT\CurrentVersion\ProfileList

3. Since this being a new user, No profile is found. The operating system checks if a domain wide default profile named "Default User" is present in the DC`s Netlogon Share

- If the domain wide profile exist, it is copied to a sub folder on the local computer with the username under %systemdrive%\documents&settings\users

- If the domain wide profile does not exist, then the local default profile is copied from %systemdrive%\documents&settings\defaultuser to %systemdrive%\documents&settings\users

4. The user registry hive (ntuser.dat) is mapped to the HKEY_Current_User portion of the registry

5. The user "%userprofile% environment variable is updated with the value of the local profile folder

6. When the user logs off a profile is saved to the local hard disk


Local Profile - Existing User

1. The User Logs On

2. The operating system checks the list of user profiles located in HKLM\Software\Microsoft\WinNT\CurrentVersion\ProfileList

3. The user registry hive (ntuser.dat) is mapped to the HKEY_Current_User portion of the registry

4. The user "%userprofile% environment variable is updated with the value of the local profile folder

5. When the user logs off a profile is saved to the local hard disk


Roaming Profile - New User

1. The User Logs On

2. The path (where the roaming profile is stored) to the user`s roaming profile is retrieved from the user object on the domain controller

3. Windows checks if the profile folder exist on the path where the roaming profiles are getting stored. Since this is a new user, no folder will be found in the path on the file system. The operating system then creates a folder with the name of the user in the location where the roaming profiles are getting stored

4. Windows checks the list of users profiles in HKLM\Software\Microsoft\WinNT\CurrentVersion\ProfileList to determine if a cache copy of the profile exists. Since this being a new user, no entry in HKLM\Software\Microsoft\WinNT\CurrentVersion\ProfileList will be found

5. The operating system checks if a domain wide default profile named "Default User" is present in the DC`s Netlogon Share

- If the domain wide profile exist, it is copied to a sub folder on the local computer with the username under %systemdrive%\documents&settings\users

- If the domain wide profile does not exist, then the local default profile is copied from %systemdrive%\documents&settings\defaultuser to %systemdrive%\documents&settings\users

6. The user registry hive (ntuser.dat) is mapped to the HKEY_Current_User portion of the registry

7. The user "%userprofile% environment variable is updated with the value of the local profile folder

8. When the user logs off a profile is copied to the location where the roaming profiles are getting saved (network Location) configured by the administrator in the users`s properties. If the profile folder with the name of the user already exists on the network location, then the profile is merged with the server copy


Roaming Profile - Existing User

1. The User Logs On

2. The path (where the roaming profile is stored) to the user`s roaming profile is retrieved from the user object on the domain controller

3. Windows checks if the profile folder exist on the location where the roaming profiles are getting stored

4. Windows checks the list of users profiles in HKLM\Software\Microsoft\WinNT\CurrentVersion\ProfileList to get the path of the user`s cache profile

5. The contents to the local cache profile are compared with the copy of the profile on the server and finally merged

6. The user registry hive (ntuser.dat) is mapped to the HKEY_Current_User portion of the registry

7. The user "%userprofile% environment variable is updated with the value of the local profile folder

8. When the user logs off a profile is copied to the location where the roaming profiles are getting saved (network Location) configured by the administrator in the users`s properties.