Manage User Profiles in XP

Before you start

Objectives: learn where to find user profile, how to create roaming or mandatory profile and how to change target locations for specific folders.

Prerequisites: you should know what is user profile in general and how to manage user accounts in XP.

Key terms: profile, user, account, documents, ntuser, roaming, mandatory


Profile Location

User profile contains all of our custom settings that we have made to our computer. In Windows XP user profiles are stored inC:\Documents and Settings\ folder. Inside this directory we will see a folder for each user which has logged on to the computer.

Documents and Settings Folder

Image 178.1 – Documents and Settings Folder

If we open a folder for some particular user we will see, among other things, an NTUSER.dat file, which contains user settings. Specific user files are contained in folders like Desktop, My Documents etc. In the picture below we can see Administrator profile. Note that hidden files have to be shown to see NTUSER.dat file.

Administrator Profile

Image 178.2 – Administrator Profile

Types of Profiles

Along with local profile we can also have a Roaming user profile. We would use Roaming profile if we often log on to multiple computers on the network, and we want our settings to follow us around. Another type of profile that we can create is theMandatory user profile. Mandatory profile is a read only profile, so that any changes made by a user will be lost when they log off.

Create Roaming Profile

To create a roaming profile we have to create a shared folder on some server. In this example, we have created shared folder called Profiles on a computer named server. The UNC (Universal Naming Convention) path to this folder is now \\server\profiles\. We will use this path when providing profile path for particular user (\\server\profiles\%username% syntax).

The next step can be done in two ways. We can either copy existing profile to the network share or we can simply define new profile path for particular user. If we copy existing user profile to the shared folder, we have to ensure that the proper permissions are set on that folder, so that only particular user has access to it. In this case we would set the user profile path to that particular directory. To do that we can go to the Computer Management, then Local Users and Groups, Users folder, right-click on particular user and then select the Profile tab.  In our example we have copied existing user folder for anderson user account. On the picture below, notice that we have changed the profile path for that particular user.

Profile Path

Image 178.3 – Profile Path

Another option is that we only set the profile path (without copying user profile to the shared folder). In this case system will automatically create new user profile on a shared folder when a user logs on to the computer. That’s because no user profile for that user account will exit on that location.

Create Mandatory Profile

The first step in specifying the mandatory profile is to create a profile that will be shared by multiple users. In our case we will create a user account named Students.

Students User Account

Image 178.4 – Students User Account

Next thing we need to do is to log on to the system using the Students user account and make the appropriate changes. After we configure all the settings we want, we have to log off from the Students account and then log on using some other account with administrative privileges (Administrator in our case). The next step in configuring a mandatory profile is to save it to a central location. Let’s go to the Start Menu, right-click My Computer and select Properties to open system properties. Now, we will go to the Advanced tab, and under User Profiles section we will click on the Settings button. In this window we can see all profiles that are currently saved on the system.

List of User Profiles

Image 178.5 – List of User Profiles

We are currently logged on as Administrator so we can not copy or delete this particular user profile. This is why we have created different user account that we will be using as a mandatory user account. Now, we want to copy Students profile, so we will select that account, and then click Copy To button. We have already created a folder in which we will save this profile, so we will click on Browse button, navigate to the C:\MandatoryProfile folder, and click on the OK button. Now , we have to change permissions for this user profile, so we have to click on the Change button in ‘Permitted to use‘ section. Normally, profile is used by a single user, but this profile is going to be used by multiple users, so we will give the Everyone group permission to use this profile.

Copy Profile

Image 178.6 – Copy Profile

The next step is to make that profile a read-only profile. To do that, we will browse to the C:\MandatoryProfile\ folder and rename the NTUSER.dat to NTUSER.man. This makes it a mandatory profile. If you don’t see NTUSER.dat file, it’s because it’s hidden by default. In that case, we have to select ‘Show hidden files and folders‘ in Folder Options menu.

Renaming NTUSER.DAT

Image 178.7 – Renaming NTUSER file

The final step is to configure local user account to use the mandatory profile (Students in our case). Let’s go back to Computer Management, and Users folder under Local Users and Groups. We right-click on the Students user, select Properties option, go to the Profile tab, and enter the Profile path, which is in our case C:\MandatoryProfile.

Students Profile Path

Image 178.8 – Students Profile Path

We can point any other user to use that same mandatory profile, at the same time. We don’t have to create a separate mandatory profile for different user accounts (but we can if we want to).

Create Custom Default Profile

The Default User profile is used to create a new profile for users who have never logged on to the machine before. To create a custom default profile we have to begin by logging in with some random user account (in our case we will use IMadruga account), and make changes that we want to be available for all new users. When we make changes to user profile, we will copy that profile to the Default User location. Let’s go to the Start Menu, right-click My Computer, select Properties to open System Properties, go to the Advanced tab, and under User Profiles click on the Settings button. Now we will copy the IMadruga user profile, so we will select it and click the Copy To button. We have to select the new location for our user profile and in this case, we will navigate to the C:\Documents and Settings\Default User\ folder, because we want this profile to be used as the default user profile.

Default User Profile

Image 178.9 – Copy to Default User Location

When we click the OK button, we have to change the permissions for default user profile. We want everyone to be able to use this profile, so we will select the Everyone group. We have to keep in mind that the old default profile is now overwritten. If we wanted to save old settings, we should have backed it up. Now, whenever a new user logs on to this particular machine, he will get our newly defined default user settings.

Redirect Folders

XP creates My Documents folder for each user account. This folder is used to store files saved by the user. Let’s take a look to the properties of My Documents. We will right-click it and select the Properties option.

Target Location for My Documents Folder

Image 178.9 – Target Location for My Documents Folder

Notice the target location. This My Documents folder is located on the C drive, in Administrator profile folder. If we want to, we can change or move the location of My Documents folder, even to a network path. Moving My Documents folder is useful for data protection or for easier backup.

End users can only redirect the following folders: My Documents, My Music, My Pictures, and My Videos. Group Policy can only redirect the following folders: Application Data, Desktop, My Documents, My Music, My Pictures, My Videos, and Start Menu. We can use the %username% variable to redirect folders to unique parent folders based on user name. When we redirect folders, the default is to copy the existing folder contents to the new location. Redirecting folders does not delete the existing folder or prevent data from being stored in the folder. It only redirects the shortcut that points to the target folder. By default, users are given the necessary permissions to manage their redirected folders.

Remember

NTUSER.dat file is hidden by default. Roaming profile is saved on a network share. To create a roaming profile we can simply change the path of the profile  to point to the network share, and the system will create new, roaming profile for that particular user. To create a mandatory profile we have to rename the NTUSER.dat file to NTUSER.man, which will make it a read-only profile. Everyone must have permisions to access the Default profile. We can change target location for specific folders like My Documents, Desktop etc.

Paths that are mentioned in this article
  • C:\Documents and Settings\ – folder in which all user profiles are located by default
  • \\server\profiles\ – shared folder which was used to save roaming user profile
  • C:\MandatoryProfile – folder which we used to create mandatory profile
  • C:\Documents and Settings\Default User\ – path to the defualt user profile