FindUserName Returns ERROR_FILE_NOT_FOUND Instead of S_OK

This article was previously published under Q274723
This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
There is an issue that involves the use of the FindUser method on the DiskQuota scripting object. When a logon name is provided for a user whose SID-Name pair is not yet in the operator's SID-Name cache, the FindUser method returns HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) rather than S_OK as documented in the Software Development Kit (SDK).
CAUSE
The problem is in the C++ IDiskQuotaControl::FindUserName method and the corresponding scripting FindUser method, both of which are implemented in Dskquota.dll.

If the logon name that is provided to the method is for a valid user but there is no entry in the disk quota SID-Name cache for that user, the method returns HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) rather than S_OK as documented in the SDK. If there is an entry in the SID-Name cache for that user, the method returns S_OK as required.
RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
260910 How to Obtain the Latest Windows 2000 Service Pack
WORKAROUND
You can call the DiskQuota scripting TranslateLogonNameToSid method to obtain a SID string for the user. That string can be passed to "FindUser" rather than the name. This results in "FindUser" succeeding with S_OK.
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 Windows 2000 Service Pack 2.
MORE INFORMATION
This issue does not affect users of the Windows 2000 Disk Quota tool. It may affect developers or system administrators who want to use this call in the development of a quota tool or in script-based management.
Properties

Article ID: 274723 - Last Review: 10/21/2013 01:56:12 - Revision: 3.2

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • kbnosurvey kbarchive kbbug kbfix kbwin2000presp2fix KB274723
Feedback