Fix: Userenv event 1521 and Userenv 1511 errors in Windows Server 2003 Application log


The following events were listed in the Windows 2003 event log when one of our second level help desk staff connected to the server console via RDP:

Event 1521 Source Userenv 

Windows cannot locate the server copy of your roaming profile and is attempting to log you on with your local profile. Changes to the profile will not be copied to the server when you logoff. Possible causes of this error include network problems or insufficient security rights. If this problem persists, contact your network administrator.   

DETAIL – The network name cannot be found.
 
Event 1511 Source Userenv
 
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
 
The solution, as outlined in KB941339, is to delete the SID entries for the source user account from the following registry subkey:
 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
 
To determine the user’s SID, save the script found at
as a .vbs file.  
 
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
Set objAccount = objWMIService.Get _
    (“Win32_UserAccount.Name=’kenmyer’,Domain=’fabrikam'”)
Wscript.Echo objAccount.SID
 
Change the Win32_UserAccount.Name=’kenmyer’,Domain=’fabrikam
 
from kenmeyer and fabrikam to the user account in question and your domain name.

I saved the script as getsid.vbs.  Open a command prompt, and execute the script using cscript:

cscript.exe getsid.vbs

The script will display the SID associated with the user account specified.  Delete this from:

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

to correct the Userenv errors.

4 Responses to “Fix: Userenv event 1521 and Userenv 1511 errors in Windows Server 2003 Application log”

  1. Jane Says:

    Thank you so much, I have been searching for an article on this for weeks! It’s amazing how information and technology can get the best of us sometimes!

  2. Piotr Says:

    I thing it is necessary to delete user guid/sid from
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PolicyGuid] .
    Otherwise error 1511 will appear again.
    Useful link is: http://www.theshonkproject.com/index.php?option=com_content&task=view&id=25&Itemid=30 .

    • mcsevm Says:

      Ok this worked for me in a different way. When the user was logged out the SID disappeared (it was released) however the error still remained, so what i did was:
      with the user logged in:
      1 – I exported (saved) the key wit the sid on
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

      2 – i deleted it

      3- had the user to logoff and reimported the key. If i delete the key and do not reimport the user was not able to login.

      4- when the user logged back in and the error disappeared.

  3. Fix: Userenv event 1521 and Userenv 1511 errors in Windows Server 2003 Application log « Swollen Technology Says:

    […] http://thebackroomtech.com/2009/05/19/fix-userenv-event-1521-and-userenv-1511-errors-in-windows-serv… […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: