Перейти к основному содержимому
Basic Active Directory: Domains, OUs & GPOs
Урок 10 из 10

Basic Active Directory: Domains, OUs & GPOs

Understand how Active Directory organizes forests, domains, and Organizational Units, how DNS, LDAP, and Kerberos work together, and how Group Policy precedence governs Windows hosts.

Средний 26 мин Linux и Windows
Этого урока пока нет на выбранном языке — показана версия на другом языке. Перевод готовится.
Только в разрешённой среде — Описанные здесь приёмы применяются только в учебных лабораториях и в системах, которые принадлежат вам или на которые есть письменное разрешение.

Цели обучения

  • Explain the hierarchy of forests, trees, domains, and Organizational Units in Active Directory
  • Distinguish Organizational Units from security groups when assigning permissions and policies
  • Describe how clients use DNS, Kerberos, and LDAP to authenticate and locate directory objects
  • Predict the winning configuration using LSDOU Group Policy precedence rules
  • Inspect domain objects and group memberships using ADUC and the PowerShell ActiveDirectory module

Рекомендуется заранее: Windows Users, Groups, ACLs & ServicesWindows Event Logs: Security, System & PowerShell

#Why this matters

Standalone Windows hosts keep local SAM accounts and local security policies, which becomes unmanageable across dozens or thousands of machines. Active Directory Domain Services (AD DS) centralizes identity, authentication, and host configuration. Understanding domains, Organizational Units (OUs), and Group Policy Objects (GPOs) is vital for both administrators and defenders, because misconfigured OUs, permissive GPOs, and over-privileged groups are common paths to domain compromise.

#Forests, domains, and Organizational Units

Active Directory stores objects on Domain Controllers (DCs) in the NTDS.dit database and replicates shared policy files through SYSVOL.

Container Role Security Boundary? Links GPOs?
Forest Top-level container sharing one schema and Global Catalog Yes No
Tree Domains sharing a contiguous DNS namespace No No
Domain Partition of users, computers, groups, and OUs (lab.local) Administrative only Yes
OU Sub-container inside a domain (OU=Servers) No Yes

Every object has a unique Distinguished Name (DN) read from object to root, such as CN=jdoe,OU=Helpdesk,OU=Staff,DC=lab,DC=local.

Do not confuse an OU with a Security Group:

  • OUs group objects to link GPOs and delegate administration (such as password resets inside OU=Workstations).
  • Security Groups grant access permissions on file shares, printers, and privileged roles. You cannot assign NTFS ACLs to an OU or link a GPO directly to a security group.

#How DNS, Kerberos, and LDAP work together

A domain-joined host uses three core protocols on every logon and policy refresh:

  1. DNS locates DCs via SRV records like _ldap._tcp.dc._msdcs.lab.local and _kerberos._tcp.lab.local.
  2. Kerberos (port 88) authenticates users and computers through the KDC on the DC, issuing a TGT and Service Tickets instead of resending passwords.
  3. LDAP (port 389, or 636 for LDAPS) queries directory attributes and finds GPO links for the computer and user DNs.
Domain logon and policy retrieval in lab.localDomain logon and policy retrieval in lab.localClientDNSDC (KDC)DC (LDAP)DC (SYSVOL)Query SRV _kerberos._tcp.lab.localdc01.lab.local (10.10.10.10)AS-REQ / TGS-REQ (port 88)TGT and Service TicketsQuery GPO links for Computer & User DNs (port 389)Download GPO templates over SMBComputer settings apply at startup; User settings apply at logon

#Group Policy Objects and LSDOU precedence

A Group Policy Object (GPO) separates Computer Configuration (applied at startup) from User Configuration (applied at logon). Each GPO spans AD metadata and template files under \\lab.local\SYSVOL\lab.local\Policies\{GUID}.

Conflicting GPO settings resolve in LSDOU order, where the last applied policy wins:

  1. Local policy
  2. Site-linked GPOs
  3. Domain-linked GPOs (Default Domain Policy)
  4. Organizational Unit-linked GPOs, from parent OU down to child OU

Block Inheritance on an OU stops non-enforced parent GPOs, while Enforced on a parent link overrides child OUs and bypasses Block Inheritance. Security Filtering and WMI Filtering narrow which targets apply a GPO.

#Querying AD with ADUC and PowerShell

Administrators use Active Directory Users and Computers (dsa.msc) to manage accounts, OUs, and delegation, and Group Policy Management (gpmc.msc) to manage GPO links. For repeatable audits, use the PowerShell ActiveDirectory module:

powershell
Import-Module ActiveDirectory

# Inspect domain details and PDC emulator
Get-ADDomain | Select-Object DNSRoot, DomainMode, PDCEmulator

# Audit privileged group membership recursively
Get-ADGroupMember -Identity "Domain Admins" -Recursive |
    Select-Object Name, SamAccountName, ObjectClass

# List OUs and their Distinguished Names
Get-ADOrganizationalUnit -Filter * | Select-Object Name, DistinguishedName

On an endpoint, gpresult /r confirms which GPOs won evaluation:

Checking applied Group Policy on a workstation
$ gpresult /r /scope:computer

RSOP data for LAB\WKSTN-01 on WKSTN-01 : Logging Mode
-----------------------------------------------------
Applied Group Policy Objects
-----------------------------
    Workstation-Hardening-GPO
    Default Domain Policy

#Defending and common mistakes

  • Confusing OUs with Security Groups: Moving a user into OU=Finance grants no share access. Use security groups for ACLs and OUs for GPO scope and delegation.
  • Treating a Domain as a security boundary: Compromising a child domain often escalates to the parent forest. Separate trust boundaries by forest.
  • Overusing Domain Admins: Logging into workstations with Domain Admins exposes Tier 0 credentials; delegate OU rights to separate helpdesk accounts instead.
  • Unmonitored GPO write rights: Regularly audit GPO permissions and SYSVOL changes to prevent policy-based persistence.
  • Broken internal DNS: Pointing hosts to external DNS breaks SRV discovery, Kerberos, and Group Policy updates.

#Summary

Active Directory structures objects across forests, domains, and OUs, relying on DNS, Kerberos, and LDAP for discovery, authentication, and policy lookup. OUs organize objects for delegation and GPO linking, while security groups govern resource permissions. GPO conflicts follow LSDOU precedence, and auditing group membership and GPO edit permissions with ADUC and PowerShell enforces least privilege.

Проверка знаний

Войдите, чтобы проходить тест, завершать уроки и сохранять прогресс. Войти в систему

Практика: проверьте свои знания