
Managing Roles Using the Command-Line
119
ldapmodify
-a
-D "cn=Directory Manager" -w secret -h host -p 389
2. Create the managed role entry, containing the
nsManagedRoleDefinition
object class, which
in turn inherits from the
LdapSubEntry
,
nsRoleDefinition
, and
nsSimpleRoleDefinition
object classes.
dn: cn=Marketing,ou=people,dc=example,dc=com
objectclass: top
objectclass: LdapSubEntry
objectclass: nsRoleDefinition
objectclass: nsSimpleRoleDefinition
objectclass: nsManagedRoleDefinition
cn: Marketing
description: managed role for marketing staff
3. Assign the role to a marketing staff member named Bob, using
ldapmodify
:
ldapmodify -D "cn=Directory Manager" -w secret -h host -p 389
dn: cn=Bob,ou=people,dc=example,dc=com
changetype: modify
add: nsRoleDN
nsRoleDN: cn=Marketing,ou=people,dc=example,dc=com
The
nsRoleDN
attribute in the entry indicates that the entry is a member of a managed role,
cn=Marketing,ou=people,dc=example,dc=com
.
5.1.3.2. Example: Filtered Role Definition
Example Corporation's administrator is creating a filtered role for sales managers.
1. Run
ldapmodify
with the
-a
option to add a new entry:
ldapmodify
-a
-D "cn=Directory Manager" -w secret -h host -p 389
2. Create the filtered role entry.
The role entry has the
nsFilteredRoleDefinition
object class, which inherits from the
LdapSubEntry
,
nsRoleDefinition
, and
nsComplexRoleDefinition
object classes.
The
nsRoleFilter
attribute sets a filter for
o
(organization) attributes that contain a value of
sales managers
.
dn: cn=SalesManagerFilter,ou=people,dc=example,dc=com
objectclass: top
objectclass: LDAPsubentry
objectclass: nsRoleDefinition
objectclass: nsComplexRoleDefinition
objectclass: nsFilteredRoleDefinition
cn: SalesManagerFilter
nsRoleFilter: o=sales managers
Description: filtered role for sales managers
Содержание DIRECTORY SERVER 8.0
Страница 18: ...xviii ...
Страница 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Страница 30: ...12 ...
Страница 112: ...94 ...
Страница 128: ...110 ...
Страница 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Страница 224: ...206 ...
Страница 324: ...306 ...
Страница 334: ...316 ...
Страница 358: ...340 ...
Страница 410: ...392 ...
Страница 420: ...402 ...
Страница 444: ...426 ...
Страница 454: ...436 ...
Страница 464: ...446 ...
Страница 484: ...466 ...
Страница 512: ...494 ...
Страница 522: ...504 ...