Red Hat Training

A Red Hat training course is available for Red Hat Directory Server

19.13. 認証に Active Directory 形式のユーザー名の使用

Directory Server に接続する場合は、uid=user_name,ou=People,dc=example,dc=com などのユーザーの識別名 (DN) を指定して認証する必要があります。ただし、DN は記憶しにくくなります。AD DN プラグインを有効にして設定する場合には、DN ではなく user_nameuser_name@domain などの Active Directory 形式のユーザー名を使用できます。
プラグインを有効にし、ユーザーは DN 形式ではないユーザー名を使用してディレクトリーに接続すると、Directory Server はプラグインの設定に基づいて DN を検索します。検索で DN が 1 つ返される場合、Directory Server はこの DN を使用して認証を行います。DN がない場合や複数の DN が返された場合は、認証に失敗します。
注記
コマンドラインで AD DN プラグインのみを有効して設定できます。
example.com をデフォルトドメインとして使用するようにプラグインを有効にして設定するには、以下を行います。
  1. cn=addn,cn=plugins,cn=config プラグインエントリーを追加し、デフォルトドメインを設定します。
    # ldapmodify -D "cn=Directory Manager" -W -p 389 -h server.example.com -x
    dn: cn=addn,cn=plugins,cn=config
    changetype: add
    objectClass: top
    objectClass: nsSlapdPlugin
    objectClass: extensibleObject
    cn: addn
    nsslapd-pluginPath: libaddn-plugin
    nsslapd-pluginInitfunc: addn_init
    nsslapd-pluginType: preoperation
    nsslapd-pluginEnabled: on
    nsslapd-pluginId: addn
    nsslapd-pluginVendor: 389 Project
    nsslapd-pluginVersion: 1.3.6.0
    nsslapd-pluginDescription: Allow AD DN style bind names to LDAP
    addn_default_domain: example.com
    プラグインエントリーで必要な addn_default_domain パラメーターにより、デフォルトのドメインが設定されます。認証時に指定されたユーザー名にドメイン名が含まれていない場合、プラグインはこのドメインを追加します。
  2. デフォルトドメインの設定エントリーを追加します。
    # ldapmodify -D "cn=Directory Manager" -W -p 389 -h server.example.com -x
    dn: cn=example.com,cn=addn,cn=plugins,cn=config
    changetype: add
    objectClass: top
    objectClass: extensibleObject
    cn: example.com
    addn_base: ou=People,dc=example,dc=com
    addn_filter: (&(objectClass=account)(uid=%s))
    この例で使用されるパラメーターの詳細は、Red Hat Directory Server の設定、コマンド、およびファイルリファレンス の説明を参照してください。
    警告
    デフォルトドメインに、少なくとも設定エントリーを追加する必要があります。エントリーが見つからないと、Directory Server は起動できません。
  3. 必要に応じて、前のステップで説明したように、追加のドメイン設定を作成して、複数のドメイン名をサポートすることができます。各ドメイン設定は、異なる検索ベースおよびフィルターを使用できます。
  4. Directory Server インスタンスを再起動します。
    # systemctl restart dirsrv@instance_name