Support Center > Search Results > SecureKnowledge Details
Using Identity Awareness AD Query without Active Directory Administrator privileges on Windows Server 2008 and above
Solution

The main reason for creating this article was to simplify the procedure for using Identity Awareness AD Query without Active Directory Administrator privileges.

Note: If there are domain controllers running on Windows Server 2003 in the domain, this article would not apply to those servers. You should follow sk43874 - Using Identity Awareness AD Query without Active Directory Administrator privileges on Windows Server 2003 and lower.

 

Table of Contents:

  • Background
  • Introduction
  • Procedure
  • Notes
  • Related solutions

 

Background

The AD Query (previously called Identity Logging) is designed to work when provided an Active Directory domain administrator user. This is, by far, the easiest way to set it up since the members of the Administrators group are allowed to remotely connect to the computer (by default). On the other hand, it can also use a Non-Admin user, given specific permissions.

 

Introduction

AD Query uses Windows Management Instrumentation (WMI) to query Active Directory Domain Controllers for the Security Event logs. To handle the remote calls to the Domain Controllers, AD Query uses Distributed COM (DCOM) technology. In order to connect to a remote computer using WMI, WMI permissions should be granted, and DCOM settings and WMI namespace security settings should enable the connection. After a user/group can connect to the Domain Controller using WMI, it should have the permissions to read the Security Event logs.

There are four main stages:

  • Creating a user/group and granting it DCOM permissions.
  • Giving the user/group WMI permissions.
  • Adding read permissions to the Security Event logs.
  • Configuring the user/group to be used for AD Query in the SmartDashboard.

 

Procedure

  1. Create a user with Distributed COM and Event reading permissions

    1. Create a domain user (or use an existing one). It is possible to create a security group, add this user to the group and apply the procedure, described in this article, on the group.

    2. Add this user/group to the built-in domain groups: Distributed COM Users, Event Log Readers, and Server Operators.

    3. Make sure that DCOM remote launch activation permissions and remote access permissions are granted for the Distributed COM Users group (as described in Securing a Remote WMI Connection):

    Make sure the user is a member of the following groups:

    • Distributed COM Users
    • Domain Users
    • Event Log Readers
    • Server Operators
  2. Grant the user WMI permissions

    Note: This step should be performed on each Domain Controller.

    1. Run Windows Management Instrumentation (WMI) console:

      Go to Start menu - click on Run... - type wmimgmt.msc - click on OK/press Enter.
    2. Right-click on WMI Control - click on Properties.

    3. Go to the Security tab - expand Root.

    4. Select CIMV2 - click on Security button.

    5. Add the domain user that you have created to work with AD Query.
      Grant him the Remote Enable permission.

    6. Click on Advanced button.

    7. Make sure that the permissions for the domain user apply to This namespace and subnamespaces.

    8. Click on OK and close the dialogs.

  3. Restart WMI service

    Note: This step should be performed on each Domain Controller.

    1. Run the Windows Services Manager:

      Go to Start menu - click on Run... - type services.msc - click on OK/press Enter.

    2. Locate the Windows Management Instrumentation service and restart (right-click on the service - click on Restart).

  4. Configure the user to be used for AD Query in the SmartDashboard

    1. Create an AD user with Distributed COM and Event reading permissions.

    2. Install policy to apply the change.

 

Notes

  • If you need the selected user to be able to reset password, then apply this to the Windows Server for that user:
    Delegate 1 Task - Reset user passwords and force password change at next logon
    KB296999 - Minimum permissions are needed for a delegated administrator to force password change at next logon procedure

  • In some setups, the procedure above may not work due to the installed software that impacts the user permissions (e.g., due to ThinPrint Diagnostic Utility installed by VMware Tools). In such case, follow this procedure:

    1. Open the privileged Windows Command Prompt (As Administrator).

    2. Check whether ThinPrint Diagnostic appears in the list of event publishers using the Windows Events Command Line Utility:

      wevtutil el | findstr /I /C:"ThinPrint Diagnostic"
    3. If "ThinPrint Diagnostic" indeed appears on the list of event publishers, then follow these steps:

      1. Download this AD Query Permissions script

      2. Unpack the ZIP archive to extract the PowerShell script file - adq_permissions.ps1

      3. Put the adq_permissions.ps1 in the root of disk C:\ on the Domain Controller machine

      4. Open the privileged Windows Command Prompt (As Administrator)

      5. Run the PowerShell script:

        powershell C:\adq_permissions.ps1 /U=username /C > C:\wevtutil_commands.txt

        Notes:

      6. In the output file C:\wevtutil_commands.txt, find the line for "ThinPrint Diagnostics" (output will be unique in each environment).

        Example of such line:
        wevtutil sl "ThinPrint Diagnostics" /ca:O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0xf0007;;;BA)(A;;0x2;;;SO)(A;;0x2;;;IU)(A;;0x2;;;SU)(A;;0x2;;;S-1-5-3)(A;;0x2;;;LS)(A;;0x2;;;NS)(A;;0x1;;;S-1-5-21-2191134797-4201291384-1465959234-1108)
      7. Copy the entire command "wevtutil sl ..." for "ThinPrint Diagnostics" from the C:\wevtutil_commands.txt file, paste it in the Windows Command Prompt and press Enter.

        Important Note: The should not be any prompt/output.
      8. On the Identity Awareness Gateway, re-initiate the credentials for the user:

        [Expert@HostName:0]# adlog a control reconf

 

Give us Feedback
Please rate this document
[1=Worst,5=Best]
Comment