Windows – NTUSER.DAT files locked by System process – logging in as TEMP profile

windowswindows xp

I have a lab of Windows XP SP3 computers on a domain. Occasionally, students logging in are greeted with the message…

Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a corrupt local profile. If this problem persists, contact your network administrator.

Followed immediately by…

Windows cannot find the local profile
and is logging you on with a temporary
profile. Changes to your profile will
be lost when you log off.

This affects most (but not necessarily all) domain users of that computer until the computer is restarted, at which point their profiles become accessible again.

We are not using roaming profiles.

A search for NTUSER.DAT in Process Explorer on an affected machine reports that the System process is locking NTUSER.DAT files for multiple users, including users that have not recently logged on:

Process      PID      Type    Handle or DLL
System       4        Handle  C:\Documents and Settings\Administrator\NTUSER.DAT
System       4        Handle  C:\Documents and Settings\TEMP.(domain)\NTUSER.DAT
System       4        Handle  C:\Documents and Settings\(user 1)\NTUSER.DAT
System       4        Handle  C:\Documents and Settings\(user 2)\NTUSER.DAT
System       4        Handle  C:\Documents and Settings\(user 3)\NTUSER.DAT
System       4        Handle  C:\Documents and Settings\(user 4)\NTUSER.DAT

I have encountered this problem when running no antivirus software, Symantec Endpoint Protection, even Microsoft Security Essentials, so it does not seem to be antivirus-related.

This does not seem to happen anywhere else on site. Possibly related info: the computers are rebooted infrequently, typically entering standby mode when not in use; the specific computers in question are Lenovo A58 desktop towers.

Best Answer

Log in with an admin account, clean up the admin accounts users profile as much as possible. Run CCleaner registry cleaner.

Then, using a seperate admin account, copy the NTUSER.DAT file from the previous (cleaned up) admin account into the Default User profile directory. Backup NTUSER.DAT from the default user directory first, of course.

Then install the User Hive Profile Cleanup Service (which helps make sure all connections to the user hive (NTUSER.DAT) are closed correctly on log off or shutdown.

If the students user accounts can be deleted, delete them so that the next time the log in they'll get the new user profile registry hive.

This will remove any corrupt registry hives, as well as repair the default hive to minimize problems, and instates a software package that watches for problems going forward.