Solaris のシステム管理 (ネーミングとディレクトリサービス : DNS、NIS、LDAP 編)

第 11 章 LDAP クライアントと Sun Java System Directory Server の設定 (手順)

この章では、Sun Java System Directory Server (以前の名称は Sun ONE Directory Server) を構成して、Solaris LDAP ネームサービスクライアントのネットワークをサポートする方法について説明します。この情報は、Sun Java System Directory Server に固有の情報です。ディレクトリサーバーのインストールおよび構成については、Sun Java Enterprise System に収められている Sun Java System Directory Server のマニュアルを参照してください。


注 –

Sun Java System Directory Server を構成して Solaris LDAP クライアントを使用する前に、Sun Java System Directory Server に付属するインストールおよび構成のマニュアルで説明されているすべての手順を実行しておく必要があります。



注 –

ディレクトリサーバー (LDAP サーバー) をそのクライアントとして使用することはできません。


この章の内容は次のとおりです。

idsconfig を使用した Sun Java System Directory Server の構成

サーバーのインストール用チェックリストの作成

サーバーのインストール時に定義する重要な変数を使用して、次に示すようなチェックリストを作成してから、idsconfig を起動してください。「記入用のチェックリスト」で提供されるチェックリストを使用できます。


注 –

次の情報は、以降の LDAP 関連の章に示されるすべての例の基礎になります。サンプルのドメインは、全国規模で店舗を展開する部品会社である Example, Inc. のものです。例の中では、その West Coast Division (ドメインは west.example.com) を対象に説明します。


表 11–1 サーバーで定義する変数

変数 

サンプルネットワークの定義 

インストールしたディレクトリサーバーインスタンスのポート番号 

389 (デフォルト) 

サーバー名  

myserver (完全指定ドメイン名 myserver.west.example.com または 192.168.0.1)

複製サーバー (IP 番号: ポート番号) 

192.168.0.2 [myreplica.west.example.com 用]

ディレクトリマネージャー 

cn=directory manager (デフォルト) 

サービスされるドメイン名  

west.example.com

クライアント要求の処理がタイムアウトするまでの時間 (秒) 

-1-

各検索要求で返されるエントリの最大数 

-1-


注 –

defaultServerList または preferredServerList の定義でホスト名を使用する場合、ホストの検索に LDAP を使用してはなりません。これは、/etc/nsswitch.confhosts 行に ldap を含めることはできないことを意味します。


表 11–2 クライアントプロファイルで定義する変数

変数 

サンプルネットワークの定義 

プロファイル名 (デフォルト名は「default」) 

WestUserProfile

サーバーリスト (デフォルトはローカルサブネット) 

192.168.0.1

優先されるサーバーリスト (優先順に記載) 

none

検索範囲 (検索するディレクトリツリーレベルの数、「One」 (デフォルト) または「Sub」)

one (デフォルト)

サーバーへのアクセスに使用する資格。デフォルトは anonymous

proxy

参照に従うかどうか。(メインサーバーが使用できない場合の別のサーバーへのポインタ)。デフォルトは no

Y

検索時にサーバーが情報を返すまでの待機時間の制限 (デフォルトは 30) 

default

サーバーとの通信時のバインド時間の制限 (デフォルトは 10 秒)  

default

認証方式。デフォルトは none

simple


注 –

クライアントプロファイルはドメインごとに定義されます。指定されたドメインで、1 つ以上のプロファイルを定義する必要があります。


属性インデックス

idsconfig が作成する次の属性リストにより、パフォーマンスが向上します。

membernisnetgroup

pres,eq,sub

nisnetgrouptriple

pres,eq,sub

ipHostNumber

pres,eq,sub

uidNumber

pres,eq

gidNumber

pres,eq

ipNetworkNumber

pres,eq

automountkey

pres,eq

oncRpcNumber

pres,eq

スキーマ定義

idsconfig(1M) により、必要なスキーマ定義が自動的に追加されます。LDAP 管理に精通しているユーザー以外、サーバースキーマを手動で変更してはなりません。LDAP ネームサービスの使用するスキーマ拡張リストについては、第 14 章LDAP の一般的なリファレンスを参照してください。

インデックス表示の使用

Sun Java System Directory Server のインデックス表示機能は、仮想リスト表示 (VLV) とも呼ばれます。クライアントは、インデックス表示を使用して、非常に長いリストから、グループや複数のエントリを選択して表示できます。このため、各クライアントの検索処理時間を短縮できます。インデックス表示により最適化かつ事前定義された検索パラメータが提供されるため、Solaris LDAP ネームクライアントは、さまざまなサービスから特定の情報により素早くアクセスできるようになります。インデックス表示を作成しない場合、サーバーが検索時間を制限するため、またはエントリの数を特定される場合があるために、クライアントが指定されたタイプのエントリすべてを取得できない場合があります。

VLV はディレクトリサーバー上に構成されるため、プロキシユーザーはこれらのインデックスに読み取りアクセス権限を保持します。

Sun Java System Directory Server 上でインデックス表示を構成する前に、これらのインデックスの使用に関連したパフォーマンスのコストを検討してください。詳細については、ご使用のバージョンの Sun Java System Directory Server の『管理者ガイド』を参照してください。

idsconfig は、複数の VLV インデックスのエントリを作成します。サーバーを停止し、実際の VLV インデックスを作成するには、directoryserver スクリプトを使用してください。詳細については、idsconfig(1M) および directoryserver(1M) のマニュアルページを参照してください。idsconfig によって作成された VLV エントリと、実行する必要がある、対応する directoryserver コマンドの構文を確認するには、idsconfig コマンドの出力を参照してください。idsconfig 出力の例は、idsconfig 設定の例」を参照してください。

サービス検索記述子を使用してさまざまなサービスへのクライアントアクセスを変更する

サービス検索記述子 (SSD) を使用すると、LDAP 内の指定された操作のデフォルト検索要求を、ユーザーが定義した検索に変更できます。たとえば、これまでカスタマイズしたコンテナ定義や別のオペレーティングシステムで LDAP を使用してきたユーザーが、最新の Solaris リリースに移行する場合などに、SSD は特に役に立ちます。SSD を使用すると、既存の LDAP データベースおよびデータを変更せずに、Solaris LDAP ネームサービスを構成できます。

idsconfig を使用して SSD を変更する

前出の Example, Inc. が LDAP を構成済みで、ユーザーを ou=Users コンテナに格納しているものとします。これを最新の Solaris リリースにアップグレードします。定義では、Solaris LDAP クライアントは、ユーザーエントリが ou=People コンテナに格納されていると想定しています。このままでは、LDAP クライアントは passwd サービス検索時に DIT の ou=people レベルを検索するため、適切な値を検出できません。

この問題を解決する手のかかる方法の 1 つは Example, Inc. の既存の DIT を完全に置き換え、Example, Inc. のネットワーク上の既存アプリケーションすべてを書き換えて、新規 LDAP ネームサービスとの互換性を持たせる方法です。別のはるかに望ましい解決策は、SSD を使用して、LDAP クライアントに対しユーザー情報をデフォルトの ou=people コンテナ内ではなく ou=Users コンテナ内で検索するよう指示する方法です。

idsconfig を使用して、Sun Java System Directory Server の構成時に必要な 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 の実行


注 –

idsconfig の実行には特別な権限は不要であり、LDAP ネームサービスクライアントになる必要もありません。「サーバーのインストール用チェックリストの作成」 を実行する準備として、Creating a Checklist Based on Your Server Installationで説明したチェックリストを作成してください。idsconfig を、サーバーまたは LDAP ネームサービスクライアントマシンから実行する必要はありません。ネットワーク上の任意の Solaris マシンから idsconfig を実行できます。



注意 – 注意 –

idsconfig は、ディレクトリマネージャーのパスワードを平文で送信します。これを防ぐには、idsconfig をクライアント上ではなくディレクトリサーバー上で実行する必要があります。


Procedureidsconfig を使用して Sun Java System Directory Server を構成する方法

  1. ターゲットの Sun Java System Directory Server が起動して実行中であることを確認してください。

  2. idsconfig を実行します。


    # /usr/lib/ldap/idsconfig
    

    この章の冒頭の 「サーバーのインストール用チェックリストの作成」で示した、サーバーおよびクライアントのチェックリストの定義を使用した idsconfig の実行例として、例 11–1 を参照してください。

  3. 表示される質問に答えます。

    ユーザー入力のデフォルトは「no」です。質問の詳細を表示する場合は、


    h
    

    と入力します。すると、簡単なヘルプが表示されます。

    idsconfig によるディレクトリの設定が完了したら、サーバー設定を完了してサーバーをクライアント対応にする前に、サーバー上で指定されたコマンドを実行する必要があります。

idsconfig 設定の例

この節では、多くのデフォルト値を使用した基本的な idsconfig 設定の例を示します。クライアントプロファイルを変更する最も複雑な方法は、SSD を作成する方法です。詳細については、「サービス検索記述子を使用してさまざまなサービスへのクライアントアクセスを変更する」を参照してください。

プロンプトの後ろにある [ ] 内のデータは、そのプロンプトのデフォルト値を表しています。デフォルト値を使用する場合は、Return キーを押します。


注 –

サマリー画面で空白になっているパラメータは設定されません。


idsconfig によるディレクトリの設定が完了したら、サーバー設定を完了してサーバーをクライアント対応にする前に、サーバー上で指定されたコマンドを実行する必要があります。


例 11–1 Example, Inc. ネットワークでの idsconfig の実行

次の例では、サーバーインスタンスが LDAP サーバーに作成された直後に、idsconfig ユーティリティーが実行されます。


# usr/lib/ldap/idsconfig
It is strongly recommended that you BACKUP the directory server
before running idsconfig.

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 JES Directory Server's  hostname to setup: myserver
Enter the port number for iDS (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]
  Checking LDAP Base DN ...
  Validating LDAP Base DN and Suffix ...
  No valid suffixes were found for Base DN dc=west,dc=example,dc=com
Enter suffix to be created (b=back/h=help): [dc=west,dc=example,dc=com]
Enter ldbm database name (b=back/h=help): [west]
  sasl/GSSAPI is not supported by this LDAP server
Enter the profile name (h=help): [default] WestUserProfile
Default server list (h=help): [192.168.0.1]
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
  4  self
  5  self proxy
  6  self 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
  6  sasl/GSSAPI
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]
Do you want to modify the server timelimit value (y/n/h)? [n] y
Enter the time limit for iDS (current=3600): [-1]
Do you want to modify the server sizelimit value (y/n/h)? [n] y
Enter the size limit for iDS (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]
Do you want to enable shadow update (y/n/h)? [n]
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
         Suffix to create          : dc=west,dc=example,dc=com
         Database to create        : west
  3  Profile name to create        : WestUserProfile
  4  Default Server List           : 192.168.0.1
  5  Preferred Server List         :
  6  Default Search Scope          : one
  7  Credential Level              : proxy
  8  Authentication Method         : simple
  9  Enable Follow Referrals       : FALSE
 10  iDS Time Limit                : -1
 11  iDS 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                    : 10
 19  Enable shadow update          : FALSE
 20  Service Search Descriptors Menu

Enter config value to change: (1-20 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. Database west successfully created.
  7. Suffix dc=west,dc=example,dc=com successfully created.
  8. NisDomainObject added to dc=west,dc=example,dc=com.
  9. Top level "ou" containers complete.
  10. automount maps: auto_home auto_direct auto_master auto_shared processed.
  11. ACI for dc=west,dc=example,dc=com modified to disable self modify.
  12. Add of VLV Access Control Information (ACI).
  13. Proxy Agent cn=proxyagent,ou=profile,dc=west,dc=example,dc=com added.
  14. Give cn=proxyagent,ou=profile,dc=west,dc=example,dc=com read permission 
      for password.
  15. Generated client profile and loaded on server.
  16. Processing eq,pres indexes:
      uidNumber (eq,pres)   Finished indexing.
      ipNetworkNumber (eq,pres)   Finished indexing.
      gidnumber (eq,pres)   Finished indexing.
      oncrpcnumber (eq,pres)   Finished indexing.
      automountKey (eq,pres)   Finished indexing.
  17. Processing eq,pres,sub indexes:
      ipHostNumber (eq,pres,sub)   Finished indexing.
      membernisnetgroup (eq,pres,sub)   Finished indexing.
      nisnetgrouptriple (eq,pres,sub)   Finished indexing.
  18. Processing VLV indexes:
      west.example.com.getgrent vlv_index   Entry created
      west.example.com.gethostent vlv_index   Entry created
      west.example.com.getnetent vlv_index   Entry created
      west.example.com.getpwent vlv_index   Entry created
      west.example.com.getrpcent vlv_index   Entry created
      west.example.com.getspent vlv_index   Entry created
      west.example.com.getauhoent vlv_index   Entry created
      west.example.com.getsoluent vlv_index   Entry created
      west.example.com.getauduent vlv_index   Entry created
      west.example.com.getauthent vlv_index   Entry created
      west.example.com.getexecent vlv_index   Entry created
      west.example.com.getprofent vlv_index   Entry created
      west.example.com.getmailent vlv_index   Entry created
      west.example.com.getbootent vlv_index   Entry created
      west.example.com.getethent vlv_index   Entry created
      west.example.com.getngrpent vlv_index   Entry created
      west.example.com.getipnent vlv_index   Entry created
      west.example.com.getmaskent vlv_index   Entry created
      west.example.com.getprent vlv_index   Entry created
      west.example.com.getip4ent vlv_index   Entry created
      west.example.com.getip6ent vlv_index   Entry created

idsconfig: Setup of iDS server myserver is complete.


Note: idsconfig has created entries for VLV indexes.

      For DS5.x, use the directoryserver(1m) script on myserver
      to stop the server.  Then, using directoryserver, follow the
      directoryserver examples below to create the actual VLV indexes.

      For DS6.x, use dsadm command delivered with DS6.x on myserver
      to stop the server.  Then, using dsadm, follow the
      dsadm examples below to create the actual VLV indexes.

  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getgrent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.gethostent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getnetent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getpwent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getrpcent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getspent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getauhoent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getsoluent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getauduent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getauthent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getexecent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getprofent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getmailent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getbootent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getethent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getngrpent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getipnent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getmaskent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getprent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getip4ent
  directoryserver -s <server-instance> vlvindex -n west -T west.example.com.getip6ent

  <install-path>/bin/dsadm reindex -l -t west.example.com.getgrent <directory-instance-path> 
   dc=west,dc=example,dc=com
  <install-path>/bin/dsadm reindex -l -t west.example.com.gethostent <directory-instance-path> 
   dc=west,dc=example,dc=com
  .
  .
  .
  <install-path>/bin/dsadm reindex -l -t west.example.com.getip6ent <directory-instance-path> 
   dc=west,dc=example,dc=com

ldapaddent を使用したディレクトリサーバーの生成


注 –

pam_unix を使用している場合、データを使用してディレクトリサーバーを生成する前に、パスワードを UNIX Crypt 形式で格納するようにサーバーを構成してください。pam_ldap を使用している場合、任意の形式でパスワードを格納できます。UNIX crypt 形式でパスワードを設定する方法については、Sun Java System Directory Server のマニュアルを参照してください。


ldapaddent は、標準入力から (/etc/filename passwd など) データを読み取り、このデータをサービスに関連付けられたコンテナに配置します。クライアント構成により、デフォルトのデータ書き込み方法が決定されます。


注 –

ldapaddent(1M) は LDAP クライアント上でのみ実行できます。LDAP ネームサービス用のクライアントの構成方法については、第 12 章LDAP クライアントの設定 (手順)を参照してください。


Procedureldapaddent を使ったユーザーパスワードデータによる Sun Java System Directory Server の生成方法

ldapaddent(1M) のマニュアルページを参照してください。LDAP セキュリティーおよび Directory Server への書き込みアクセスの詳細については、第 9 章LDAP 基本コンポーネントおよび概念 (概要)を参照してください。

  1. ldapaddent コマンドを使用して、/etc/passwd エントリをサーバーに追加します。


    # ldapaddent -D "cn=directory manager" -f /etc/passwd passwd
    

プリンタエントリの管理

プリンタの追加

プリンタエントリを 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 の使用

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)

追加プロファイルを使用してディレクトリサーバーを生成する

ldapclientgenprofile オプションとともに使用すると、指定された属性に基づいて、構成プロファイルの LDIF 表現を作成できます。作成したプロファイルは、次に LDAP サーバーに読み込まれ、クライアントプロファイルとして使用されます。クライアントプロファイルは、 ldapclient init を使うことによりクライアントからダウンロードできます。

ldapclient genprofile の使用方法の詳細については、ldapclient(1M) のマニュアルページを参照してください。

Procedureldapclient を使った追加プロファイルによるディレクトリサーバーの生成方法

  1. スーパーユーザーになるか、同等の役割を引き受けます。

    役割には、認証と特権コマンドが含まれます。役割の詳細については、『Solaris のシステム管理 (セキュリティサービス)』の第 9 章「役割によるアクセス制御の使用 (手順)」を参照してください。

  2. ldapclient コマンドを genprofile オプションとともに使用します。


    # ldapclient genprofile \
    -a profileName=myprofile \
    -a defaultSearchBase=dc=west,dc=example,dc=com \
    -a "defaultServerList=192.168.0.1 192.168.0.2:386" \
    

    > myprofile.ldif

  3. 新規プロファイルをサーバーにアップロードします。


    # ldapadd -h 192.168.0.1 -D “cn=directory manager” -f myprofile.ldif
    

ディレクトリサーバーを構成してアカウント管理を有効にする

Solaris 10 10/09 リリース以降では、pam_ldap を使用するクライアントと pam_unix を使用するクライアントに対してアカウント管理を実装できます。


注意 – 注意 –

同じ LDAP ネームドメインで pam_ldappam_unix の両方を使用しないでください。すべてのクライアントが pam_ldap を使用するか、またはすべてのクライアントが pam_unix を使用します。この制限により、専用の LDAP サーバーが必要になる場合があります。


pam_ldap を使用するクライアントの場合

pam_ldap が正しく動作するには、パスワードとアカウントのロックアウトポリシーがサーバー上で正しく構成されている必要があります。ディレクトリサーバーコンソール、または ldapmodify を使用して、LDAP ディレクトリのアカウント管理ポリシーを構成できます。手順と詳細については、ご使用のバージョンの Sun Java System Directory Server の『管理者ガイド』の「ユーザーアカウントの管理」の章を参照してください。


注 –

以前は、pam_ldap アカウント管理を有効にすると、システムにログインする際には、常にすべてのユーザーが認証用にログインパスワードを入力する必要がありました。そのため、rshrloginssh などのツールによるパスワードを使用しないログインは失敗します。

一方、pam_ldap(5) を Sun Java System Directory Server DS5.2p4 以降のリリースで使用することで、ユーザーはパスワードを入力せずに、rshrloginrcp、および ssh を使ってログインできるようになりました。

pam_ldap(5) は変更され、ユーザーのログイン時に Directory Server への認証を実行せずに、アカウントの管理およびユーザーのアカウント状態の取得を実行できるようになりました。Directory Server 上でこの機能を制御するのは、1.3.6.1.4.1.42.2.27.9.5.8 です。これは、デフォルトで有効になっています。

この制御をデフォルト以外に変更する場合は、Directory Server 上でアクセス制御情報 (ACI) を追加します。


dn: oid=1.3.6.1.4.1.42.2.27.9.5.8,cn=features,cn=config
objectClass: top
objectClass: directoryServerFeature
oid:1.3.6.1.4.1.42.2.27.9.5.8
cn:Password Policy Account Usable Request Control
aci: (targetattr != "aci")(version 3.0; acl "Account Usable"; 
     allow (read, search, compare, proxy)
     (groupdn = "ldap:///cn=Administrators,cn=config");)
creatorsName: cn=server,cn=plugins,cn=config
modifiersName: cn=server,cn=plugins,cn=config

proxy ユーザー用のパスワードは、期限が切れてはいけません。proxy パスワードが期限切れになった場合、 proxy 資格レベルを使用するクライアントはサーバーからネームサービス情報を取り出すことができません。proxy ユーザーのパスワードの期限が切れないことを保証するために、次のスクリプトを記述して proxy アカウントを変更します。


# ldapmodify -h ldapserver -D administrator DN \
-w administrator password <<EOF
dn: proxy user DN
DNchangetype: modify
replace: passwordexpirationtime
passwordexpirationtime: 20380119031407Z
EOF

注 –

pam_ldap のアカウント管理は、Sun Java System Directory Server をもとにユーザーのパスワードやアカウントの有効期限情報を維持し、ユーザーに知らせます。ディレクトリサーバーは、ユーザーアカウントを検査する際、対応するシャドウエントリを解釈しません。しかし、pam_unix がシャドウデータを調査して、アカウントがロックされているか、パスワードが古くなっているかを判断します。LDAP ネームサービスやディレクトリサーバーはシャドウデータを最新の状態に維持しているわけではないので、pam_unix はシャドウデータに基づいたアクセスを許可するべきではありません。シャドウデータは proxy 識別情報を使って検出します。そのため、proxy ユーザーに userPassword 属性への読み取りアクセスを許可しないでください。proxy ユーザーを userPassword へ読み取りアクセスさせないことにより、 pam_unix が無効なアカウントの検証を行わないようになります。


pam_unix を使用するクライアントの場合

Solaris LDAP クライアントがアカウント管理に対して pam_unix を使用できるようにするには、シャドウデータの更新を有効にするようにサーバーを設定する必要があります。この機能は、Solaris 10 10/09 リリース以降で使用できます。pam_ldap アカウント管理とは異なり、pam_unix は追加の構成手順が必要がありません。すべての構成は、idsconfig ユーティリティーを実行して行うことができます。基本的な idsconfig の実行については、例 11–1を参照してください。

次に 2 つの idsconfig 実行の出力を示します。

最初の idsconfig 実行では、既存のクライアントプロファイルを使用します。


# /usr/lib/ldap/idsconfig

It is strongly recommended that you BACKUP the directory server
before running idsconfig.

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 JES Directory Server's  hostname to setup: myserver
Enter the port number for iDS (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]
  Checking LDAP Base DN ...
  Validating LDAP Base DN and Suffix ...
  sasl/GSSAPI is not supported by this LDAP server

Enter the profile name (h=help): [default] WestUserProfile

Profile 'WestUserProfile' already exists, it is possible to enable
shadow update now. idsconfig will exit after shadow update
is enabled. You can also continue to overwrite the profile
or create a new one and be given the chance to enable
shadow update later.

Just enable shadow update (y/n/h)? [n] y
Add the administrator identity (y/n/h)? [y]
Enter DN for the administrator: [cn=admin,ou=profile,dc=west,dc=example,dc=com]
Enter passwd for the administrator: 
Re-enter passwd: 
  ADDED: Administrator identity cn=admin,ou=profile,dc=west,dc=example,dc=com.
         Proxy ACI LDAP_Naming_Services_proxy_password_read does not 
         exist for dc=west,dc=example,dc=com.
  ACI SET: Give cn=admin,ou=profile,dc=west,dc=example,dc=com read/write access 
           to shadow data.
  ACI SET: Non-Admin access to shadow data denied.

  Shadow update has been enabled.

2 つ目の idsconfig 実行では、後で使用するための新しいプロファイルを作成します。出力の一部のみが表示されています。


# /usr/lib/ldap/idsconfig

It is strongly recommended that you BACKUP the directory server
before running idsconfig.

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 JES Directory Server's  hostname to setup: myserver
Enter the port number for iDS (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]
  Checking LDAP Base DN ...
  Validating LDAP Base DN and Suffix ...
  sasl/GSSAPI is not supported by this LDAP server

Enter the profile name (h=help): [default] WestUserProfile-new
Default server list (h=help): [192.168.0.1]
.
.
.
Do you want to enable shadow update (y/n/h)? [n] y

              Summary of Configuration

  1  Domain to serve               : west.example.com
  2  Base DN to setup              : dc=west,dc=example,dc=com
         Suffix to create          : dc=west,dc=example,dc=com
  3  Profile name to create        : WestUserProfile-new
.
.
.
 19  Enable shadow update          : TRUE
.
.
.
Enter DN for the administrator: [cn=admin,ou=profile,dc=west,dc=example,dc=com]
Enter passwd for the administrator:
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.
.
.
.
  11. ACI for dc=test1,dc=mpklab,dc=sfbay,dc=sun,dc=com modified to 
      disable self modify.
.
.
.
  15. Give cn=admin,ou=profile,dc=west,dc=example,dc=com write permission for shadow.
...

Sun Java System Directory Server の移行

Sun Java System Directory Server 5.1 (以前の名称は Sun ONE Directory Server) リリースと Sun Java System Directory Server 5.2 リリース間のスキーマ変更が実装されました。ldapaddent コマンドは、ethers/bootparams のエントリに objectclass: device を追加します。したがって、LDAP コマンドを使用してディレクトリデータを Sun Java System Directory Server 5.1 から 5.2 に移行する場合、ldapaddent -d を使用してデータをエクスポートし、ldapaddent を使用してデータをインポートする必要があります。あるいは、Sun Java System Directory Server ツール db2ldif および ldif2db を使用してデータを移行する場合、データの移行の前にすべてのパッチを Sun Java System Directory Server 5.2 に適用する必要があります。パッチを適用しないと、データのインポートに失敗する可能性があります。

Sun Java System Directory Server 5.2 の構成については、Sun Java Enterprise System に収められている Sun Java System Directory Server のマニュアルを参照してください。