> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/password-rotation/rotation-use-cases/local-network/active-directory.md).

# Active DirectorユーザーまたはOpenLDAPユーザー

![](/files/lFPcDJXnX1DkVQ49dfN7)

## 概要 <a href="#overview" id="overview"></a>

本ページでは、KeeperPAMを使用してActive DirectoryまたはOpenLDAPのユーザーアカウントをリモートからローテーションする方法を取り扱います。ローカルネットワークにおけるローテーションの概要については、こちらの[ページ](/keeperpam/jp/privileged-access-manager/password-rotation/rotation-use-cases.md#local-network)をご参照ください。

## 要件 <a href="#prerequisites" id="prerequisites"></a>

以下がすでに完了していることを前提としています。

* [ロール](/keeperpam/jp/privileged-access-manager/getting-started/enforcement-policies.md)にローテーション強制適用ポリシーが設定されていること
* Keeperシークレットマネージャー[アプリケーション](/keeperpam/jp/privileged-access-manager/getting-started/applications.md)が作成済みであること
* [Keeperゲートウェイ](/keeperpam/jp/privileged-access-manager/getting-started/gateways.md)がオンラインであること
* KeeperゲートウェイがディレクトリへLDAPS (ポート636) またはLDAP (ポート389) で通信できること

## 1. PAMディレクトリ認証情報の設定 <a href="#id-1-set-up-a-pam-directory-credential" id="id-1-set-up-a-pam-directory-credential"></a>

Keeperローテーションでは、リンクされた管理者認証情報で、ディレクトリ内の他のアカウントをローテーションします。このアカウントにドメイン管理者権限は不要ですが、他のアカウントのパスワードを正常に変更できる必要があります。

{% hint style="info" %}
リンクされた管理者認証情報は、要件で作成したKSMアプリケーションに共有されている共有フォルダ内に配置する必要があります。この特権アカウントへのアクセスはKSMアプリケーションのみに必要であり、ユーザーと共有する必要はありません。
{% endhint %}

![](/files/iExZYyWstcIKuwbcOV03)

#### PAMディレクトリレコードのフィールド

<table><thead><tr><th width="194.5">フィールド</th><th>説明</th></tr></thead><tbody><tr><td><strong>レコードタイプ</strong></td><td>PAMディレクトリ</td></tr><tr><td><strong>タイトル</strong></td><td>Keeperレコードのタイトル</td></tr><tr><td><strong>ホスト名またはIPアドレス</strong></td><td>ディレクトリサーバーのIPアドレス、ホスト名、またはFQDN。例: <code>10.10.10.10</code>、<code>dc01.mydomain.local</code></td></tr><tr><td><strong>ポート</strong></td><td><code>636</code> (Active DirectoryのローテーションにはLDAPSが必要)。<br>ポート <code>389</code> のLDAPは安全ではないため避けること</td></tr><tr><td><strong>SSLの使用</strong></td><td>Active Directoryで使用する場合は有効化必須</td></tr><tr><td><strong>管理者認証情報</strong></td><td>LDAPローテーションを実行するリンク済みPAMユーザー認証情報。例: <code>rotationadmin</code></td></tr><tr><td><strong>ドメイン名</strong></td><td>Active Directoryのドメイン名。例: <code>mydomain.local</code></td></tr><tr><td><strong>ディレクトリタイプ</strong></td><td><code>Active Directory</code> または <code>OpenLDAP</code> に設定</td></tr></tbody></table>

## 2. PAM構成の設定 <a href="#id-2-set-up-a-pam-configuration" id="id-2-set-up-a-pam-configuration"></a>

{% hint style="info" icon="pencil-line" %}
環境にPAM構成がすでにある場合は、この手順を省略できます。
{% endhint %}

[PAM構成](/keeperpam/jp/privileged-access-manager/getting-started/pam-configuration.md)は、環境とKeeperゲートウェイおよび認証情報を関連付けます。この活用事例向けのPAM構成がまだない場合は、新規作成してください。

<table><thead><tr><th width="200">フィールド</th><th>説明</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>タイトル</strong></td><td>構成名。例: <code>My Active Directory</code></td><td></td></tr><tr><td><strong>環境</strong></td><td><code>Local Network</code> を選択</td><td></td></tr><tr><td><strong>ゲートウェイ</strong></td><td>ディレクトリサーバーへアクセスできるゲートウェイを選択</td><td></td></tr><tr><td><strong>アプリケーションフォルダ</strong></td><td>PAMディレクトリレコードが格納されている共有フォルダを選択</td><td></td></tr><tr><td><strong>その他のフィールド</strong></td><td>活用事例により異なります。[PAM構成](../../../getting-started/pam-configuration/)のセクションをご参照ください。</td><td></td></tr></tbody></table>

## 3. PAMユーザーレコードの設定 <a href="#id-3-set-up-pam-user-records" id="id-3-set-up-pam-user-records"></a>

KeeperPAMでは、**PAMディレクトリ**レコードにリンクされた認証情報で、環境内の他の**PAMユーザー**レコードをローテーションします。PAMユーザー認証情報は、Keeperシークレットマネージャーアプリケーションに割り当てた共有フォルダに保存します。以下の例では、ADユーザー `demouser` をローテーションできます。

![](/files/lztKxlLXj9IZVAI84SIQ)

#### PAMユーザーレコードのフィールド

<table><thead><tr><th width="194.5">フィールド</th><th>説明</th></tr></thead><tbody><tr><td><strong>レコードタイプ</strong></td><td>PAMユーザー</td></tr><tr><td><strong>タイトル</strong></td><td>Keeperレコードのタイトル。例: <code>AD User - demouser</code></td></tr><tr><td><strong>ログイン</strong></td><td>ローテーション対象アカウントのユーザー名。形式は対象システムとサービスの種類によります。<br><br>例:<br><code>demouser</code><br><code>demouser@domain.local</code></td></tr><tr><td><strong>パスワード</strong></td><td>アカウントパスワードはオプションです。多くの場合、既存パスワードは不要ですが、シナリオやプロトコルによっては必要になることがあります。</td></tr><tr><td><strong>識別名</strong></td><td>Active DirectoryおよびOpenLDAPディレクトリで必須です。<br><br>ユーザーのLDAP DN。例:<br><code>CN=Demo User,CN=Users,DC=lureydemo,DC=local</code></td></tr></tbody></table>

ユーザーのDNが不明な場合は、以下のPowerShellコマンドで確認できます。

```
Get-ADUser -Identity <username> -Properties DistinguishedName
```

## 4. レコードでローテーションを構成 <a href="#id-4-configure-rotation-on-the-record" id="id-4-configure-rotation-on-the-record"></a>

PAMユーザーレコードを選択し、編集して **\[パスワードローテーション設定]** を開きます。

PAMユーザーレコードに `edit` 権限があり、[強制適用ポリシー](/keeperpam/jp/privileged-access-manager/getting-started/enforcement-policies.md)でローテーションが許可されているユーザーは、そのレコードのローテーションを設定できます。

![](/files/Kz9IKbMyNpuZAaHk7wW0)

* **\[ローテーション]** の種類は **\[一般]** を選択
* **\[PAMリソース]** フィールドでは、以前に設定した**PAMディレクトリ**認証情報を選択
* 希望するスケジュールとパスワードの複雑さを選択
* 保存すると、ローテーションボタンが有効になり、オンデマンドまたは選択したスケジュールでローテーション可能

## トラブルシューティング <a href="#troubleshooting" id="troubleshooting"></a>

LDAPが正しく構成されているか確認するには、`LDP.exe` を実行して接続をテストします。この接続に成功していれば、Keeperローテーションも正常に動作します。

![](/files/srsAe4Td9CqqOCzJAK0K)

## 自己署名証明書でのテスト <a href="#testing-with-a-self-signed-cert" id="testing-with-a-self-signed-cert"></a>

KeeperでActive Directoryユーザーアカウントのローテーションをテストするには、LDAPS接続が有効で有効な証明書が使用されている必要があります。テストのみで本番用証明書がない場合は、以下の手順で自己署名証明書を使用できます。

{% hint style="warning" %}
Active Directoryで自己署名証明書を使用するのはテスト目的に限ります。本番環境では使用しないでください。
{% endhint %}

{% stepper %}
{% step %}
**証明書の作成**

管理者としてPowerShellを実行し、自己署名証明書を作成します。証明書のサブジェクト名および代替名はサーバーのホスト名と一致している必要があります。本例では、プライマリ名は `XYZ123.company.local`、代替名は `company.local` と `company` です。

{% code overflow="wrap" %}

```
New-SelfSignedCertificate -DnsName XYZ123.company.local,company.local,company, -CertStoreLocation cert:\LocalMachine\My
```

{% endcode %}
{% endstep %}

{% step %}
**証明書のインストール**

このスクリプトは、証明書マネージャーの個人ストアから証明書を取得し、信頼済みドメインにコピーします。スクリプト1行目の `company` パラメータを、手順1のドメインに置き換えてください。

{% code overflow="wrap" %}

```
# 作成した証明書を取得
$cert = Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {$_.Subject -like "*company*"}
$thumbprint = ($cert.Thumbprint | Out-String).Trim()

# レジストリ経由でNTDSにコピー
$certStoreLoc = 'HKLM:/Software/Microsoft/Cryptography/Services/NTDS/SystemCertificates/My/Certificates'
if (!(Test-Path $certStoreLoc)) {
    New-Item $certStoreLoc -Force
}
Copy-Item -Path HKLM:/Software/Microsoft/SystemCertificates/My/Certificates/$thumbprint -Destination $certStoreLoc

# 信頼されたルートストアにコピー
$rootStore = New-Object System.Security.Cryptography.X509Certificates.X509Store([System.Security.Cryptography.X509Certificates.StoreName]::Root, 'LocalMachine')
$rootStore.Open('ReadWrite')
$rootStore.Add($cert)
$rootStore.Close()
```

{% endcode %}
{% endstep %}

{% step %}
**NTDSの再起動**

NTDSサービスを再起動すると、証明書がインストールされます。

```
Restart-Service NTDS -force
```

{% endstep %}

{% step %}
**接続の確認**

`LDP.exe` を実行し、SSLを有効にしてポート636でローカルドメインに接続できることを確認します。

![](/files/GgvB2FamRxNGTZdpka1J)
{% endstep %}
{% endstepper %}

## 本番環境向けLDAPS証明書 <a href="#production-ldaps-certification" id="production-ldaps-certification"></a>

本番環境では、KeeperPAMの利用に信頼された認証局（CA）が発行した証明書によるLDAPS接続が必要です。

対応しているLDAPS証明書は以下のとおりです。

<table><thead><tr><th width="247.4140625">証明書発行元の種類</th><th>説明</th></tr></thead><tbody><tr><td>エンタープライズ内部認証局（CA）</td><td>Microsoft AD CSなどの内部PKIで証明書を発行・管理します。大規模エンタープライズで一般的ですが、独立して管理されるドメインが多い環境では運用負荷が高くなる場合があります。</td></tr><tr><td>公開認証局（CA）</td><td>DigiCert、GlobalSign、Entrustなどの信頼された公開CAが証明書を発行します。内部PKI基盤が不要で、複数ドメインや分散管理環境で利用しやすい方式です。</td></tr><tr><td>サーバー認証</td><td>LDAPS接続には、Server Authentication拡張キー用法を含む証明書が必要です。発行元の種類にかかわらず必要となる標準要件です。</td></tr><tr><td>ドメインコントローラーのFQDN</td><td>TLS検証エラーを防ぐため、証明書はドメインコントローラーのFQDNに対して発行されている必要があります。複数DC環境では、DCごとに証明書が必要になる場合があります。</td></tr></tbody></table>

自己署名証明書はテスト用途に限り使用でき、本番環境での使用は推奨されません。


---

# 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:

```
GET https://docs.keeper.io/keeperpam/jp/privileged-access-manager/password-rotation/rotation-use-cases/local-network/active-directory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
