Microsoft Knowledge Base Email Alertz

Applications using NetUserGetInfo and similar APIs rely on read access to certain AD objects

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 2281774 - Last Review: August 19, 2010 - Revision: 7.0

Applications using NetUserGetInfo and similar APIs rely on read access to certain AD objects

System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you. Visit the Windows Vista Solution Center

Summary

You have an application that uses the down-level APIs of the NetUser or NetGroup class like NetUserGetInfo, NetUserSetInfo, NetUserEnum, NetGroupGetInfo, NetGroupSetInfo, NetGroupEnum, NetLocalGroupGetInfo, NetLocalGroupSetInfo and NetLocalGroupEnum. In this scheme, the NetUser class APIs are also used to manage computer account.

The same APIs are used when you invoke the ADSI WINNT provider.

These APIs may fail with "ACCESS DENIED" although the calling account has sufficient permissions on the target accounts. The reason for this is that the client side API implementation does not have a 1:1 relationship with Security Account Manager (SAM) RPC APIs. The client side performs additional checks and preparation for these calls which require additional permissions in Active Directory.

One application that uses these APIs is the cluster service, and in the cluster service log you will see:

00000a78.000021b8::2010/06/15-00:00:47.911 WARN  [RES] Network Name <cluster-resource1>: Couldn't determine if computer account cluster-resource1 is already disabled. status 5

Another symptom of this effect might be excessive audit records in the Security Eventlog of your DCs for these API calls and the objects quoted below, if successful or failure access auditing for the calling account is enabled.

More Information

The implementation of the APIs uses multiple RPC calls directed at the Domain Controller, to setup the session and verify the domain. It accesses the following objects with read access:

  • Domain Root Object: It looks up the primary domain of the Domain Controller and opens the domain for reading, which in turn opens the AD object for the domain, like DC=contoso,dc=com.
  • Builtin container: This is the root object of the builtin domain. It is opened as the caller wants to verify its existence. Thus the caller needs read access to the container CN=Builtin,DC=contoso,dc=com.
  • SAM server object: This object stores general permissions about general SAM account access and enumeration. It will be used on certain calls only. The object name is cn=server,cn=system,DC=contoso,dc=com.

In most Active Directory domains, permissions to these objects are granted based on the membership in generic groups like "Authenticated Users", "Everyone" or the "Pre-Windows 2000 Compatible Access" group. The change to trigger the problem may have been that the user was removed from the last group (maybe together with "Everyone", and/or the permissions on the objects listed were removed in a move to harden the Active Directory permissions.

The approaches to resolve the problem is to either grant the required read permissions or to change the application to use LDAP instead of the older APIs or the ADSI WINNT provider. LDAP will not touch the objects above and it will also support the granular permissions you may have set on the target object.

Excessive Auditing:

When you have auditing enabled on these objects, you will see up to three audit records for the objects above for both opening and closing the objects, plus the actual target object access. If the events are logged excessively, it makes sense to remove the entries in the Auditing ACL so these generic access types are not logged anymore. The problem is that the Domain Root object and the Builtin Container inherit to many subordinate objects.

To solve this, you need to break inheritance at the builtin container and redefine the ACEs that inherit to only apply to this object. You also need to touch the ACEs on the Domain Root object so the problem SACEs don't apply to the domain root object anymore. The exact steps depend on the actual SACL settings that are in effect in your environment.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Microsoft Windows Server 2003 Service Pack 2
  • Windows Server 2008 Standard
  • Windows Server 2008 Enterprise
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 R2 Enterprise
Keywords: 
KB2281774
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate