> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/active-directory/fundamentals.md).

# Active Directory 基础

{% hint style="info" %}
Active Directory 存储有关网络资源的信息，使用户和管理员能够轻松组织、查找和管理这些资源。

它使用结构化数据存储作为分层信息组织的基础。该存储称为 **目录**.
{% endhint %}

Active Directory 中存储的资源通常包括：

* 服务器
* 打印机
* 用户帐户
* 网络设备

除了信息存储（数据库）之外，Active Directory 还由一组服务组成。

#### Active Directory 域服务（AD DS）

AD DS 对应于一组控制 IT 环境中不同操作的服务：

* **身份验证**：确保每个实体都确实是它所声称的身份
* **授权**：确保每个实体只能访问被授权给它的数据和服务
* **名称解析**：允许通过名称在网络元素之间进行通信
* **集中管理**：允许应用组策略（Group Policy）

### Active Directory 结构

Active Directory 逻辑结构的主要元素是：

* **林**
* **域**
* **组织单位（OU）**

#### 林

林是 Active Directory 中最高的组织层级。/ 每个林共享一个唯一的目录，并代表一个安全边界。

#### 域

林可以包含一个或多个域。

#### 组织单位（OU）

域可以包含一个或多个组织单位。

### 数据存储

域和组织单位的信息存储在一个特定的 **域控制器**.

该存储称为 **数据存储**.

信息以 **对象**的形式存储。/ 所有对象都由一个 **架构**定义，目录会基于该架构检查数据的有效性。

### 什么是域？

域是林中一个 **对象的逻辑分区** ，在同一林中共享统一的管理、安全和复制配置。

具体而言，域：

* 确保用户在整个网络中的身份一致
* 提供身份验证服务
* 提供授权服务
* 允许信息在不同域控制器之间复制，并作为一个整体进行管理
* 允许在域之间创建信任关系

### 什么是组织单位（OU）？

组织单位（OU）是一个 **容器对象** ，用于在域内组织其他对象。

它有三个主要功能：

* 允许有序地查看域对象
* 将可应用组策略（Group Policy）的对象分组
* 允许对对象分组，以便将管理权限委派给域中的其他用户或组

### Active Directory 架构（AD Schema）

Active Directory 中存储的一切都表示为 **对象**。/ 该 **架构** 定义每种对象类型的属性。

主要特性：

* 每个林只定义一个架构
* 架构副本存在于林中的所有域控制器上，确保对象定义一致
* 该 **数据存储** 使用架构来确保数据完整性

结果：

所有对象都会以统一方式创建，无论是哪个域控制器创建或修改它们。

### Active Directory 数据存储

该 **数据存储**，通常称为 **目录**，存储林中对象的所有信息：

* Users
* 组
* 计算机
* 域
* 组织单位（OU）

目录存储在 **域控制器** 上，并可被应用程序和网络服务访问。

如果有多个域控制器，则每个都拥有一个 **目录的完整副本** ，其中包含所有域信息。

***

### 数据存储组件

#### 接口

诸如 **LDAP**, **REPL**, **PAMI**，以及 **SAM** 之类的接口提供与数据库通信的方式。

#### DSA（目录系统代理）

该 **DSA** 允许：

* 访问目录
* 维护模式
* 确保对象的标识
* 强制属性的数据类型

#### 数据库层

该 **数据库层** 是一个 API，作为应用程序与目录之间的接口。

它防止应用程序直接与数据库交互，并管理对各个目录记录的访问。

#### 数据库文件

目录信息存储在一个 **单个数据库文件**.

此外， **日志文件** 用于：

* 管理事务
* 在事务未完成或失败时确保恢复


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/active-directory/fundamentals.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
