Solaris 10 10/09 リリース以降では、pam_ldap を使用するクライアントと pam_unix を使用するクライアントに対してアカウント管理を実装できます。
同じ LDAP ネームドメインで pam_ldap と pam_unix の両方を使用しないでください。すべてのクライアントが pam_ldap を使用するか、またはすべてのクライアントが pam_unix を使用します。この制限により、専用の LDAP サーバーが必要になる場合があります。
pam_ldap が正しく動作するには、パスワードとアカウントのロックアウトポリシーがサーバー上で正しく構成されている必要があります。ディレクトリサーバーコンソール、または ldapmodify を使用して、LDAP ディレクトリのアカウント管理ポリシーを構成できます。手順と詳細については、ご使用のバージョンの Sun Java System Directory Server の『管理者ガイド』の「ユーザーアカウントの管理」の章を参照してください。
以前は、pam_ldap アカウント管理を有効にすると、システムにログインする際には、常にすべてのユーザーが認証用にログインパスワードを入力する必要がありました。そのため、rsh、rlogin、ssh などのツールによるパスワードを使用しないログインは失敗します。
一方、pam_ldap(5) を Sun Java System Directory Server DS5.2p4 以降のリリースで使用することで、ユーザーはパスワードを入力せずに、rsh、rlogin、rcp、および 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 が無効なアカウントの検証を行わないようになります。
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. ... |