Microsoft KB Archive/329420

= The LookupAccountSid Function Returns the Wrong Name After You Rename Accounts =

Article ID: 329420

Article Last Modified on 2/21/2007

-

APPLIES TO


 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 3
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Service Pack 3

-



This article was previously published under Q329420



SYMPTOMS
After you change a user account name, the LookupAccountSid function still returns the old name.



CAUSE
The LookupAccountSid function accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found: BOOL LookupAccountSid( LPCTSTR lpSystemName,   PSID Sid,   LPTSTR Name,   LPDWORD cbName,   LPTSTR DomainName,   LPDWORD cbDomainName,   PSID_NAME_USE peUse ); If the LookupAccountSid function is called with a NULL lpSystemName function, it looks in the SID cache on the local computer before it goes to a domain controller. If an entry is not found or if the entry has expired in the SID cache, the domain controller is contacted. If this entry is a new entry, it is added to the SID cache on the local computer. If this entry is an expired entry, the refresh time is updated to the current time. The entries in the cache expire every five minutes. For expired entries, only the refresh time is updated. As a result, if the account name is changed, the SID cache contains the old name until you restart the computer. Because the domain controller is contacted when the entry in the SID cache expires, the correct name is returned on the first call to LookupAccountSid after the entry expires. However, the SID entry is not updated with the correct name in the SID cache and later calls return the old name.



Service Pack Information
To resolve this problem, obtain the latest service pack for Microsoft Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack

Hotfix Information
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

  Date         Time   Version           Size     File name 03-Oct-2002 13:11  5.0.2195.6076     124,176  Adsldp.dll 03-Oct-2002 13:11  5.0.2195.5781     131,344  Adsldpc.dll 03-Oct-2002 13:11  5.0.2195.5781      62,736  Adsmsext.dll 03-Oct-2002 13:11  5.0.2195.6052     358,160  Advapi32.dll 03-Oct-2002 13:11  5.0.2195.6058      49,424  Browser.dll 03-Oct-2002 13:11  5.0.2195.6012     135,952  Dnsapi.dll 03-Oct-2002 13:11  5.0.2195.6076      96,016  Dnsrslvr.dll 03-Oct-2002 13:11  5.0.2195.5722      45,328  Eventlog.dll 03-Oct-2002 13:11  5.0.2195.6059     146,704  Kdcsvc.dll 05-Sep-2002 18:18  5.0.2195.6048     200,976  Kerberos.dll 21-Aug-2002 09:27  5.0.2195.6023      71,248  Ksecdd.sys 03-Oct-2002 13:08  5.0.2195.6078     507,664  Lsasrv.dll 03-Oct-2002 13:08  5.0.2195.6078      33,552  Lsass.exe 27-Aug-2002 15:53  5.0.2195.6034     108,816  Msv1_0.dll 03-Oct-2002 13:11  5.0.2195.5979     307,472  Netapi32.dll 03-Oct-2002 13:11  5.0.2195.6075     360,720  Netlogon.dll 03-Oct-2002 13:11  5.0.2195.6076     918,800  Ntdsa.dll 03-Oct-2002 13:11  5.0.2195.6025     389,392  Samsrv.dll 03-Oct-2002 13:11  5.0.2195.5951     129,296  Scecli.dll 03-Oct-2002 13:11  5.0.2195.5951     302,864  Scesrv.dll 03-Oct-2002 13:11  5.0.2195.5859      48,912  W32time.dll 04-Jun-2002 14:32  5.0.2195.5859      57,104  W32tm.exe 03-Oct-2002 13:11  5.0.2195.6052     126,224  Wldap32.dll 03-Oct-2002 13:08  5.0.2195.6078     507,664  Lsasrv.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Windows 2000 Service Pack 4.



MORE INFORMATION
For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the article number below to view the article in the Microsoft Knowledge Base:

265173 The Datacenter Program and Windows 2000 Datacenter Server Product

Keywords: kbbug kbfix kbwin2000presp4fix kbqfe kbsecurity kbwin2ksp4fix kbhotfixserver KB329420

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.