1.4. デフォルトインデックスの維持


Directory Server は、デフォルトのインデックス属性を、cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config エントリーに格納します。なお、デフォルトのインデックス属性を維持できるのは、LDIF ステートメントを使用した場合のみです。

手順

  • たとえば、インデックスタイプが eqsub のデフォルトインデックスに roomNumber 属性を追加するには、次のように入力します。

    # ldapadd -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    objectClass: nsIndex
    objectClass: top
    cn: roomNumber
    nsSystemIndex: false
    nsIndexType: eq
    nsIndexType: sub
    Copy to Clipboard Toggle word wrap

    以下は、LDIF ステートメントの説明です。

    • objectClass: nsIndex: このエントリーがインデックスエントリーであることを定義します。
    • objectClass: top: このオブジェクトクラスは、インデックスエントリーで追加的に必要となります。
    • cn: インデックスに属性の名前を設定します。
    • nsSystemIndex: インデックスが Directory Server の運用に必須であるかどうかを示します。
    • nsIndexType: この多値属性は、インデックスタイプを指定します。
  • たとえば、roomNumber 属性のデフォルトのインデックス属性に pres インデックスタイプを追加するには、次のように入力します。

    # ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    changetype: modify
    add: nsIndexType
    nsIndexType: pres
    Copy to Clipboard Toggle word wrap
  • たとえば、roomNumber 属性のデフォルトのインデックス属性から pres インデックスタイプを削除するには、次のように入力します。

    # ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    changetype: modify
    delete: nsIndexType
    nsIndexType: pres
    Copy to Clipboard Toggle word wrap
  • たとえば、デフォルトのインデックスから roomNumber 属性を削除するには、次のように入力します。

    # ldapdelete -D "cn=Directory Manager" -W -H ldap://server.example.com -x cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    Copy to Clipboard Toggle word wrap

検証

  • デフォルトのインデックス属性をリスト表示して、変更を確認します。

    # ldapsearch -H ldap://server.example.com:389 -D "cn=Directory Manager" -W -b "cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config" -x -s one -o ldif-wrap=no
    Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat