Microsoft Windows NT Server White Paper 33
nection, those credentials are also stored here. Note that this includes only the
domain and user account name; the password is not included. When the user
receives this profile and logs on, Windows NT attempts to reconnect the drive,
but the alternate credentials are sent rather than those of the logged on user..
Note that if the UserName value contains a blank string, the credentials of the
logged on user are sent (which is the desired behavior in this case).
To avoid inadequate credentials or wrong credentials being sent, use one of
the following approaches:
• Avoid having to supply alternate credentials when you create the connec-
tions to network resources in the shared profile by granting the user
creating the template profile sufficient permissions in advance.
• Before modifying the profile to be a mandatory profile, run a REGINI script
that removes the credentials from the UserName value. Do not delete the
value, only the string data.
Troubleshooting User Profiles with the UserEnv.log File
The UserEnv.log is an invaluable tool for troubleshooting the process of load-
ing and unloading User Profiles. Each step in the User Profile process is
recorded in the log, including informational and error-related messages.
The checked version of the UserEnv.dll is the same dynamic link library
(.dll) as the retail version, except that it contains debug flags that you can set
and use with the kernel debugger. This file, which is included in both the
Windows NT Device Driver Kit (DDK) and the Windows NT Software Devel-
opment Kit (SDK), when used in conjunction with a registry entry, generates a
log file that can be used in troubleshooting and debugging problems with
roaming profiles and system policies on Windows NT 4.0 clients.
To enable logging:
1. Rename the file UserEnv.dll in the %systemroot%\SYSTEM32 directory to
UserEnv.old or to a unique name of your choice.
2. Copy the checked version of UserEnv.dll to the
%systemroot%\SYSTEM32 directory of the client machine that you want
to debug. The checked version of the UserEnv file must match the version
of the operating system and Service Pack installed on the client computer.
3. Start REGEDT32 and locate the following path:
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\WindowsNT
\CurrentVersion
\Winlogon
4. Create a new value called UserEnvDebugLevel as a REG_DWORD type.
Assign the hex value 10002.
5. Reboot the computer.
Logging information will be recorded in the root directory of the C drive as
UserEnv.log. You can use Notepad to view the log file. A sample log is pro-
vided next.