> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/run-the-platform/zh/nas/nas-join-ad-domain.md).

# 将 NAS 加入 Windows AD 网络

NAS 服务可以加入现有的 Active Directory 域，以提供 AD 集成。

## 将 NAS 加入域

1. 单击 **NAS** 在顶部菜单中。
2. 选择 **列表**.
3. **双击 NAS 服务** 从列表中。（**通常只有一个 NAS 服务。**)
4. **确认** 通过检查以下内容来确认 NAS 服务正在运行 **状态：** 仪表板左上角的字段。
5. 单击 **编辑 CIFS 设置**.
6. 请填写以下字段：
   * **访客用户映射**：为访问尝试中使用的无效用户名/密码选择所需行为：
     * *将无效用户视为访客*
     * *将无效密码视为访客*
     * *将无效的 Linux 用户视为访客*
     * *拒绝无效密码* （最安全的选项）
   * **工作组**：（这将是 **短格式域**，例如“**CompanyName**')
   * **Realm**：（这将是 **长格式域**，例如“**CompanyName.local**')
   * **服务器类型**: ***成员***
   * **AD 用户名**：一个 **有效的管理员** 在 AD 域上的账户，具有创建对象的能力。
   * **AD 密码**：所输入用户名的 Active Directory 密码。
   * **确认 AD 密码**：重复上面的 Active Directory 密码。
7. 以下字段 **不是必需的** 用于加入，通常 **应保持原样**. **强烈建议你在 Windows 环境中的 Active Directory - Users and Computers 内管理以下值**。
   * **用户主体名称**
   * **组织单位**  - 如果填写，组织单位（OU）必须已存在于 Active Directory 域中，并且在 **第 6 步** 中使用的管理员账户必须 **具有向此 OU 添加对象的权限** 。
   * **机器密码**  - 如果填写，密码 **必须** 必须满足 Active Directory 域所要求的密码复杂度要求。
   * **操作系统**
   * **操作系统版本**
   * **扩展 ACL 支持** （保持勾选）
   * **最低协议版本**  - 默认值“ - None - ”不会设置最低限制。
   * **高级配置选项**  - 允许手动输入高级使用参数，这些参数可能不会在输入字段中提供。有关将服务器加入 AD 时可用的具体参数，请参阅 Microsoft Active Directory 文档。
8. **等待** 当 NAS 虚拟机加入域时；这可能需要几分钟。
9. 如果 NAS 服务成功加入域，NAS 服务仪表板上的 CIFS 设置将显示 AD 状态为“**已加入**'.

{% hint style="success" %}
**确认 NAS 加入**

Windows AD 管理员可以通过查看以下内容来确认 NAS 已加入 *计算机对象* 在其 Windows *Active Directory - Users and Computers*中。注意：计算机对象将使用 NAS 主机名，而不是 NAS 虚拟机名称。
{% endhint %}

## AD 加入问题故障排除

如果 NAS 服务没有获得“**已加入**” AD 状态：

### 检查错误消息

检查 *日志* 在 NAS 服务仪表板页面底部查找错误消息，这些消息可能会提供有关服务为什么加入失败的信息。

### 确认指定的 AD 用户具有将计算机加入域的足够权限

### 确认 NAS 服务具有有效的 IP 配置

* NAS 服务仪表板 - 检查 **静态 vs. DHCP**
* 如果 *静态*：验证 IP 地址、网关和 DNS 服务器的设置是否正确。
* 如果 *DHCP*：检查网络以确认 NAS 虚拟机已获得有效地址。！！！“建议 NAS 服务使用静态或保留的 DHCP IP 地址。”

### 确认 NAS 已放置在正确的网络中并使用正确的设置

* 如果 NAS 服务无法访问 AD 域， **它将加入失败**.
* NAS 仪表板的 Networks/VM NICs 部分将显示 NIC 网络和状态。
* 单击 **编辑** 在 **左侧菜单** 在必要时，从 NAS 服务仪表板中选择其他网络。

### 验证工作组/Realm

* 如果工作组或 Realm **输入错误**，它将 **加入失败**.
* 工作组通常可以在任何域成员服务器上通过键入 `whoami` 在命令提示符下找到。返回的结果是 **工作组 \ 用户名**.
* Realm 通常可以在任何域成员服务器上通过查看系统属性找到。值 **域：** 列出了整个 Realm。
* 这两个属性也可以使用 `systeminfo` 命令在命令提示符下找到。

### 确认 NAS 服务可以解析域/Realm（按名称）

* 如果 *静态*：验证 IP 地址、网关和 DNS 服务器的设置是否正确。
* 如果 *DHCP*：验证网络已配置正确的 DNS 服务器。

### 确认已创建组织单位（OU）

* 如果在 VergeOS CIFS 设置中指定了组织单位（OU），则该 OU **必须已存在于 AD 中**。在尝试加入之前，请在 Active Directory 中创建该 OU。 **然后** 进行加入尝试。
* 如果在 VergeOS CIFS 设置中将组织单位（OU）字段留空（**推荐**），请确认所使用的指定 AD 账户具有 **创建对象的权限。**

### 确认密码复杂度符合要求

* 这仅在设置了机器密码字段时适用。 **建议将此字段留空**.
* 如果密码不符合 AD **密码复杂度要求，将会加入失败**.
* 机器密码不是必需字段；如果你在加入 AD 时遇到问题，最好删除该值


---

# 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://docs.verge.io/run-the-platform/zh/nas/nas-join-ad-domain.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.
