12.6. ACI の表示、追加、削除、および更新
ldapsearch
ユーティリティーを使用して検索、および ldapmodify
ユーティリティーを使用して、アクセス制御手順 (ACI) を追加、削除、および更新できます。
ACI の表示
たとえば、dc=example,dc=com
およびサブエントリーに設定された ACI を表示するには、以下のコマンドを実行します。
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -x -b "dc=example,dc=com" -s sub '(aci=*)' aci
ACI の追加
たとえば、ACI を ou=People,dc=example,dc=com
エントリーに追加するには、次のコマンドを実行します。
# ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
dn: ou=People,dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="userPassword") (version 3.0; acl
"Allow users updating their password";
allow (write) userdn= "ldap:///self";)
ACI の削除
ACI を削除するには、以下を実行します。
1 つの
aci
属性がエントリーに設定されているか、エントリーからすべての ACI を削除する場合は、以下を実行します。#
ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
dn: ou=People,dc=example,dc=com changetype: delete delete: aci複数の ACI がエントリーに存在し、特定の ACI を削除する場合は、実際の ACI を指定します。
#
ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
dn: ou=People,dc=example,dc=com changetype: modify delete: aci aci: (targetattr="userPassword") (version 3.0; acl "Allow users updating their password"; allow (write) userdn= "ldap:///self";)
ACI の更新
ACI を更新するには、以下を実行します。
- 既存の ACI を削除します。
- 更新された設定で新しい ACI を追加します。