この章では、iPlanet Directory Server 5.1 を構成して、Solaris LDAP ネームサービスクライアントのネットワークをサポートする方法について説明します。この章の内容は、iPlanet Directory Server 5.1 に固有の情報です。
Solaris LDAP クライアントで動作するよう iPlanet Directory Server 5.1 を構成する前に、第 11 章に記載された手順をすべて実行する必要があります。
ディレクトリサーバー (LDAP サーバー) を、サーバー自身のクライアントにすることはできません。
この章の内容は次のとおりです。
サーバーのインストール処理時に定義する重要な変数を使用して、以下に示すようなチェックリストを作成してから、idsconfig を起動してください。「未記入のチェックリスト」 で提供されるチェックリストを使用できます。
以下の情報は、以降の LDAP 関連の章に示されるすべての例の基礎になります。サンプルのドメインは、全国規模で店舗を展開する部品会社である Example, Inc. のものです。例の中では、その West Coast Division (ドメインは west.example.com) を対象に説明します。
変数 |
サンプルネットワークの定義 |
---|---|
インストールしたディレクトリサーバーインスタンスのポート番号 (デフォルト = 389) |
default |
サーバー名 |
ipdserver (完全指定ドメイン名 ipdserver.west.example.com または 192.168.0.0) |
複製サーバー (IP 番号:ポート番号) |
192.168.0.1 [ipdrep.west.example.com 用] |
Directory manager [dn: cn=directory manager] |
default |
サービスされるドメイン名 |
west.example.com |
クライアント要求の処理がタイムアウトするまでの時間 (秒) |
-1 |
各検索要求で返されるエントリの最大数 |
-1 |
defaultServerList または preferredServerList の定義でホスト名を使用する場合、ホストの検索に LDAP を使用してはなりません。これは、/etc/nsswitch.conf の hosts 行に ldap を含めることはできないことを意味します。
変数 |
サンプルネットワークの定義 |
---|---|
プロファイル名 |
WestUserProfile |
サーバーリスト (デフォルトはローカルサブネット) |
west.example.com または 192.168.0.0 |
優先されるサーバーリスト (優先順に記載) |
none |
検索範囲 (検索するディレクトリツリーレベルの数、「One」(デフォルト) または「Sub」) |
one (デフォルト) |
サーバーへのアクセスに使用する資格。デフォルトは匿名 |
proxy |
Y |
|
検索時にサーバーが情報を返すまでの待機時間の制限 (デフォルトは 30) |
default |
サーバーとの通信時のバインド時間の制限 (デフォルトは 10 秒)デフォルトは秒 |
2 |
認証方式。デフォルトは none |
simple |
クライアントプロファイルはドメインごとに定義されます。指定されたドメインで、1 つ以上のプロファイルを定義する必要があります。
idsconfig が作成する次の属性リストにより 、パフォーマンスが向上します。
membernisnetgroup |
pres,eq,sub |
nisnetgrouptriple |
pres,eq,sub |
memberuid |
pres,eq |
uidNumber |
pres,eq |
gidNumber |
pres,eq |
ipHostNumber |
pres,eq |
ipNetworkNumber |
pres,eq |
ipProtocolNumber |
pres,eq |
oncRpcNumber |
pres,eq |
idsconfig(1M) により、必要なスキーマ定義が自動的に追加されます。LDAP 管理に精通しているユーザー以外、サーバースキーマを手動で変更してはなりません。LDAP ネームサービスの使用するスキーマ拡張リストについては、第 18 章「一般的なリファレンス」を参照してください。
インデックス表示は、iPlanet Directory Server の機能で、仮想リスト表示とも呼ばれます。クライアントは、インデックス表示を使用して、エントリのグループや番号の記載された長いリストを表示して選択を実行できます。このため、各クライアントの検索処理を短縮できます。インデックス表示により最適化かつ事前定義された検索パラメータが提供されるため、Solaris LDAP ネームクライアントは、さまざまなサービスから特定の情報により素早くアクセスできるようになります。インデックス表示を作成しない場合、サーバーが検索時間を制限するために、クライアントが指定されたタイプのエントリすべてを取得できない場合があります。また、エントリの番号を確認できない場合もあります。
インデックスはディレクトリサーバー上に構成されるため、プロキシユーザーはこれらのインデックスに読み取りアクセス権限を保持します。
iPlanet Directory Server 上でのインデックス作成の詳細、およびその使用によるパフォーマンス上のコストについては、『iPlanet Directory Server 5.1 管理者ガイド』を参照してください。
次の例では、-n オプションでエントリをインデックス化するデータベースの名前を示し、 -s オプションでディレクトリサーバーのインスタンスを示します。
idsconfig により、デフォルト VLV インデックスがすべて作成されます。
directoryserver -s ipdserver vlvindex -n userRoot -T getgrent directoryserver -s ipdserver vlvindex -n userRoot -T gethostent directoryserver -s ipdserver vlvindex -n userRoot -T getnetent directoryserver -s ipdserver vlvindex -n userRoot -T getpwent directoryserver -s ipdserver vlvindex -n userRoot -T getrpcent directoryserver -s ipdserver vlvindex -n userRoot -T getspent |
サービス検索記述子 (SSD) を使用すると、LDAP 内の指定された操作のデフォルト検索要求を、ユーザーが定義した検索に変更できます。たとえば、これまでカスタマイズしたコンテナ定義や別のオペレーティングシステムで LDAP を使用してきたユーザーが、Solaris 9 に移行する場合などに、SSD は特に役に立ちます。SSD を使用すると、既存の LDAP データベースおよびデータを変更せずに、Solaris 9 LDAP ネームサービスを構成できます。
前出の Example, Inc. が LDAP を構成済みで、ユーザーを ou=Users コンテナに格納しているものとします。これを Solaris 9 にアップグレードしましょう。定義によって、Solaris 9 LDAP は、ユーザーエントリが ou=People コンテナに格納されているものと見なします。このままでは、LDAP は passwd サービス検索時に DIT の ou=people レベルを検索するため、適切な値を検出できません。
この問題を解決する手のかかる方法の 1 つは、Example, Inc. の既存の DIT を完全に置き換え、Example, Inc. のネットワーク上の既存アプリケーションすべてを書き換えて、新規 LDAP ネームサービスとの互換性を持たせる方法です。別のはるかに望ましい解決策は、SSD を使用して、LDAP に対しユーザー情報をデフォルトの ou=people コンテナ内ではなく ou=Users コンテナ内で検索するよう指示する方法です。
idsconfig を使用して、iPlanet Directory Server 5.1 の構成時に必要な SSD を定義できます。プロンプト行は次のようになります。
Do you wish to setup Service Search Descriptors (y/n/h? y A Add a Service Search Descriptor D Delete a SSD M Modify a SSD P Display all SSD's H Help X Clear all SSD's Q Exit menu Enter menu choice: [Quit] a Enter the service id: passwd Enter the base: service ou=user,dc=west,dc=example,dc=com Enter the scope: one[default] A Add a Service Search Descriptor D Delete a SSD M Modify a SSD P Display all SSD's H Help X Clear all SSD's Q Exit menu Enter menu choice: [Quit] p Current Service Search Descriptors: ================================== Passwd:ou=Users,ou=west,ou=example,ou=com? Hit return to continue. A Add a Service Search Descriptor D Delete a SSD M Modify a SSD P Display all SSD's H Help X Clear all SSD's Q Exit menu Enter menu choice: [Quit] q |
idsconfig の実行には特別な権限は不要であり、LDAP ネームサービスクライアントになる必要もありません。idsconfig を実行する準備として、「サーバーのインストール用チェックリストの作成」 で説明したチェックリストを作成してください。idsconfig を、サーバーまたは LDAP ネームサービスクライアントマシンから 実行する必要はありません。ネットワーク上の任意の Solaris マシンから idsconfig を実行できます。
idsconfig は、Directory Manager のパスワードを平文で送信します。これを防ぐには、 idsconfig をクライアント上ではなく ディレクトリサーバー上で実行する必要があります。
ターゲットの iPlanet Directory Server 5.1 が起動済みで実行中であることを確認します。
idsconfig を実行します。
# /usr/lib/ldap/idsconfig
表示される質問に答えます。ユーザー入力のデフォルトは「no」です。質問の詳細を表示する場合は次のように入力します。
h |
以下の idsconfig の実行例を参照する際、この章の冒頭の 「サーバーのインストール用チェックリストの作成」 で示したサーバーおよびクライアントのチェックリスト内の定義を使用してください。以下は、デフォルト設定の多くを変更しない単純な設定の例です。クライアントプロファイルを変更する最も複雑な方法は、SSD を作成する方法です。詳細については、「サービス検索記述子を使用してさまざまなサービスへのクライアントアクセスを変更する」を参照してください。
プロンプトの後のキャリッジリターンは、Enter キーを押してデフォルトの設定を受け入れたことを意味します。
(sysadmin@test) [3:10pm] ns_ldap [31] % sh idsconfig.sh
It is strongly recommended that you BACKUP the directory server before running idsconfig.sh. Hit Ctrl-C at any time before the final confirmation to exit. Do you wish to continue with server setup (y/n/h)? [n] Y |
Enter the iPlanet Directory Server's (iPlanet Directory Server) hostname to setup: IPDSERVER |
Enter the port number for iPlanet Directory Server (h=help): [389] Enter the directory manager DN: [cn=Directory Manager] Enter passwd for cn=Directory Manager : Enter the domainname to be served (h=help): [west.example.com] Enter LDAP Base DN (h=help): [dc=west,dc=example,dc=com] Enter the profile name (h=help): [default] Default server list (h=help): [192.168.0.0] Preferred server list (h=help): Choose desired search scope (one, sub, h=help): [one] The following are the supported credential levels: 1 anonymous 2 proxy 3 proxy anonymous Choose Credential level [h=help]: [1] 2 |
The following are the supported Authentication Methods: 1 none 2 simple 3 sasl/DIGEST-MD5 4 tls:simple 5 tls:sasl/DIGEST-MD5 Choose Authentication Method (h=help): [1] 2 |
Current authenticationMethod: simple Do you want to add another Authentication Method? N |
Do you want the clients to follow referrals (y/n/h)? [n] Y |
Do you want to modify the server timelimit value (y/n/h)? [n] Y |
Enter the time limit for iPlanet Directory Server (current=3600): [-1] |
Do you want to modify the server sizelimit value (y/n/h)? [n] Y |
Enter the size limit for iPlanet Directory Server (current=2000): [-1] |
Do you want to store passwords in "crypt" format (y/n/h)? [n] Y |
Do you want to setup a Service Authentication Methods (y/n/h)? [n] Client search time limit in seconds (h=help): [30] Profile Time To Live in seconds (h=help): [43200] |
Bind time limit in seconds (h=help): [10] 2 |
Do you wish to setup Service Search Descriptors (y/n/h)? [n] Summary of Configuration 1 Domain to serve : west.example.com 2 Base DN to setup : dc=west,dc=example,dc=com 3 Profile name to create : default 4 Default Server List : 192.168.0.0 5 Preferred Server List : 6 Default Search Scope : one 7 Credential Level : proxy 8 Authentication Method : simple 9 Enable Follow Referrals : TRUE 10 iPlanet Directory Server Time Limit : -1 11 iPlanet Directory Server Size Limit : -1 12 Enable crypt password storage : TRUE 13 Service Auth Method pam_ldap : 14 Service Auth Method keyserv : 15 Service Auth Method passwd-cmd: 16 Search Time Limit : 30 17 Profile Time to Live : 43200 18 Bind Limit : 2 19 Service Search Descriptors Menu Enter config value to change: (1-19 0=commit changes) [0] Enter DN for proxy agent:[cn=proxyagent,ou=profile,dc=west,dc=example,dc=com] Enter passwd for proxyagent: Re-enter passwd: |
WARNING: About to start committing changes. (y=continue, n=EXIT) Y |
1. Changed timelimit to -1 in cn=config. 2. Changed sizelimit to -1 in cn=config. 3. Changed passwordstoragescheme to "crypt" in cn=config. 4. Schema attributes have been updated. 5. Schema objectclass definitions have been added. 6. Created DN component dc=west. 7. NisDomainObject added to dc=west,dc=example,dc=com. 8. Top level "ou" containers complete. 9. Nis maps: auto_home auto_direct auto_master auto_shared processed. 10. ACI for dc=west,dc=example,dc=com modified to disable self modify. 11. Add of VLV Access Control Information (ACI). 12. Proxy Agent cn=proxyagent,ou=profile,dc=west,dc=example,dc=com added. 13. Give cn=proxyagent,ou=profile,dc=west,dc=example,dc=com read permission for password. 14. Generated client profile and loaded on server. 15. Processing eq,pres indexes: ipHostNumber (eq,pres) Finished indexing. uidNumber (eq,pres) Finished indexing. ipNetworkNumber (eq,pres) Finished indexing. gidnumber (eq,pres) Finished indexing. oncrpcnumber (eq,pres) Finished indexing. 16. Processing eq,pres,sub indexes: membernisnetgroup (eq,pres,sub) Finished indexing. nisnetgrouptriple (eq,pres,sub) Finished indexing. 17. Processing VLV indexes: getgrent vlv_index Entry created gethostent vlv_index Entry created getnetent vlv_index Entry created getpwent vlv_index Entry created getrpcent vlv_index Entry created getspent vlv_index Entry created idsconfig.sh: Setup of iPlanet Directory Server server ipdserver is complete. Note: idsconfig has created entries for VLV indexes. Use the directoryserver(1m) script on ipdserver to stop the server and then enter the following vlvindex sub-commands to create the actual VLV indexes: directoryserver -s ipdserver vlvindex -n userRoot -T getgrent directoryserver -s ipdserver vlvindex -n userRoot -T gethostent directoryserver -s ipdserver vlvindex -n userRoot -T getnetent directoryserver -s ipdserver vlvindex -n userRoot -T getpwent directoryserver -s ipdserver vlvindex -n userRoot -T getrpcent directoryserver -s ipdserver vlvindex -n userRoot -T getspent |
サマリー画面で空欄になっているパラメータは設定されません。
idsconfig によるディレクトリの設定が完了したら、サーバー設定を完了してサーバーをクライアント対応にする前に、サーバー上で指定されたコマンドを実行する必要があります。
pam_unix を使用している場合、データを使用してディレクトリサーバーを生成する前に、パスワードを Unix Crypt 形式で格納するようにサーバーを構成する必要があります。pam_ldap を使用している場合、任意の形式でパスワードを格納できます。UNIX crypt 形式でパスワードを設定する方法については、iPlanet Directory Server のドキュメントを参照してください。
ldapaddent(1M) は、LDAP ネームサービス用に構成済みのクライアントでのみ実行できます。
ldapaddent は、標準入力から (/etc/filename passwd など) データを読み取り、このデータをサービスに関連付けられたコンテナに配置します。クライアント構成により、デフォルトのデータ書き込み方法が決定されます。
次に示す例では、 ldapaddent にデータを指定してサーバーを生成します。
ldapaddent コマンドを使用して、 /etc/passwd エントリをサーバーに追加します。
# ldapaddent -D "cn=directory manager" -f /etc/passwd passwd
ldapaddent(1M) のマニュアルページを参照してください。LDAP セキュリティおよび Directory Server への書き込みアクセスの詳細については、第 13 章「基本コンポーネントおよび概念 (概要) 」を参照してください。
プリンタエントリを LDAP ディレクトリに追加する場合、 printmgr 構成ツールまたは lpset -n ldap コマンド行ユーティリティを使用します。詳細については、lpset(1M) のマニュアルページを参照してください。ディレクトリに追加されるプリンタオブジェクトは、プリンタの印刷システムクライアントが必要とする接続パラメータのみを定義することに留意してください。ローカルのプリントサーバー構成データはファイル内に保持されます。典型的なプリンタエントリは、次のようになります。
printer-uri=myprinter,ou=printers,dc=mkg,dc=example,dc=com objectclass=top objectclass=printerService objectclass=printerAbstract objectclass=sunPrinter printer-name=myprinter sun-printer-bsdaddr=printsvr.example.com,myprinter,Solaris sun-printer-kvp=description=HP LaserJet (PS) printer-uri=myprinter |
lpget(1M) を使用して、LDAP クライアントの LDAP ディレクトリが認識するプリンタエントリすべてをリスト表示できます。LDAP クライアントの LDAP サーバーが複製サーバーの場合、更新複製規約 (update replication agreement) によって、リスト表示されたプリンタはマスター LDAP サーバーのプリンタと同じ場合も同じでない場合もあります。詳細については、lpget(1M) のマニュアルページを参照してください。
たとえば、指定されたベース DN のプリンタすべてを一覧表示するには、次のように入力します。
# lpget -n ldap list
myprinter: dn=myprinter,ou=printers,dc=mkt,dc=example,dc=com bsdaddr=printsvr.example.com,myprinter,Solaris description=HP LaserJet (PS) |
ldapclient を genprofile オプションとともに使用すると、指定された属性に基づいて、構成プロファイルの LDIF 表現を作成できます。次に、作成したプロファイルを LDAP サーバーにロードして、クライアントプロファイルとして使用できます。クライアントは、ldapclient init を使用してこのファイルをダウンロードできます。
ldapclient genprofile の使用方法の詳細については、ldapclient(1M) のマニュアルページを参照してください。
以下の例では、ldapclient とともに追加プロファイルを指定して、サーバーを生成します。
スーパーユーザーになります。
ldapclient コマンドを genprofile コマンドとともに使用します。
# ldapclient genprofile -a profileName=myprofile \
-a defaultSearchBase=dc=west,dc=example,dc=com \
-a "defaultServerList=192.168.0.0 192.168.0.1:386" \
> myprofile.ldif
新規プロファイルをサーバーにアップロードします。
# ldapadd -h 192.168.0.0 -D "cn=directory manager" -f myprofile.ldif