Oracle® Internet Directory Administrator's Guide 10g (9.0.4) Part Number B12118-01 |
|
Dynamic and Static Groups in Oracle Internet Directory, 4 of 4
This section contains these topics:
If you are creating a hierarchy of groups, be sure that it is a true hierarchy as described in "Hierarchies".
Note:
See Also:
You can use Oracle Directory Manager to both create and modify static group entries.
If the entry belongs to the groupOfNames
object class, then you determine membership in the group by adding DNs to the multivalued attribute member
. If the entry belongs to the groupOfUniqueNames
object class, then you determine membership in the group by adding DNs to the multivalued attribute uniqueMember
.
To add a static group entry:
If you selected the groupOfNames
object class, a Browse button appears next to some of the fields, for example, the member field on the Mandatory Properties tab page. To enter a mandatory property by browsing:
To modify the member list for a group entry:
member
attribute and modify the value.
This section provides examples of how you create and modify static group entries.
The syntax for the LDIF file is:
dn: DN_of_group_entry objectclass: top objectclass: [groupOfNames] [groupOfUniqueNames] member: DN of member 1 member: DN of member 2 . . . member: DN of member N
The following command adds this LDIF file to the directory:
ldapadd -p port_number -h host -f file_name.ldif
The following example shows an LDIF file named myStaticGroup.ldif
for the entry for a group named MyStaticGroup:
dn: cn=myStaticGroup,c=us objectclass: top objectclass: groupOfNames member: cn=John Doe member: cn=Anne Smith
The following command adds this LDIF file to the directory:
ldapadd -p 389 -h myhost -f myStaticGroup.ldif
To add a member to a group, the syntax of the LDIF file is:
dn: DN_of_group_entry changetype: modify add:member member:DN of member entry
To delete a member from a group, the syntax of the LDIF file is:
dn: DN of group entry changetype: modify delete:member member:DN of member entry
Issue this command to modify the file:
ldapmodify -p 389 -v -f file_name.ldif
where -v specifies verbose mode.
The following example adds John Doe to a group named MyStaticGroup. As in the previous example, the data for this user entry is in the myStaticGroup.ldif
file. This file contains the following:
dn: cn=myStaticGroup,c=us changetype: modify add:member member: cn=John Doe
Issue this command to modify the file:
ldapmodify -p 389 -v -f myStaticGroup.ldif
where -v specifies verbose mode.
You can use Oracle Directory Manager to both create and modify static group entries.
If the entry belongs to the groupOfNames
object class, then you determine membership in the group by adding DNs to the multivalued attribute member
. If the entry belongs to the groupOfUniqueNames
object class, then you determine membership in the group by adding DNs to the multivalued attribute uniqueMember
.
To add a dynamic group entry:
In the Optional Properties tab page, in the labeledURI
field, specify the following:
ldap:ldap_URL
For example:
ldap://my_ host/ou=MyNeworganizationalUnit,o=MyCompany,c=US??sub?(objectclass=person)
In the orclConnectByAttribute
field, specify the attribute that you want to use as the filter for the query--for example, manager
.
In the orclConnectByStartingValue
field, specify the DN of the attribute you specified in the orclConnectByAttribute
attribute--for example, cn=Anne Smith
.
For information about specifying the other attributes that appear in the Optional Properties tab page, see Appendix B, "Oracle Internet Directory Schema Elements".
If you selected the groupOfNames
object class, a Browse button appears next to some of the fields, for example, the member field on the Mandatory Properties tab page. If you choose Browse, the Directory: Entry Management dialog box appears. Use this dialog box to search for a particular entry you want to add to the list. Then, in the Distinguished Name window of the Directory: Entry Management dialog box, select the entry and choose OK. This returns you to the New Entry dialog box. The entry you just selected is added to the list in the members window.
To modify the member list for a dynamic group entry:
member
attribute and modify the value.
This section tells you how to create and modify dynamic groups by using command-line tools.
If you use the labeledURI
attribute, then the syntax for the LDIF file is:
dn: DN_of_group_entry objectclass: top objectclass: [groupOfNames] [groupOfUniqueNames] objectclass: orcldynamicgroup labeledURI:ldap:ldap_URL member: DN of member 1 member: DN of member 2 . . . member: DN of member N
The following command adds this LDIF file to the directory:
ldapadd -p port_number -h host -f file_name.ldif
If you use the CONNECT BY
string, then the syntax for the LDIF file is:
dn: DN_of_group_entry objectclass: top objectclass: [groupOfNames] [groupOfUniqueNames] objectclass: orclDynamicGroup orclConnectByAttribute: attribute_name orclConnectByStartingValue: DN_of_attribute member: DN_of_member_1
When specifying entries in this syntax, do not use double quotes around distinguished names.
The following example shows an LDIF file for the entry for a dynamic group:
dn: cn=myDynamicGroup,c=us objectclass: top objectclass: groupOfNames objectclass: orcldynamicgroup labeledURI:ldap:
//my_host/ou=MyNeworganizationalUnit,o=MyCompany,c=US??sub?(objectclass=person) member: cn=John Doe member: cn=Anne Smith
The following command adds this LDIF file to the directory:
ldapadd -p 389 -h myhost -f myDynamicGroup.ldif
To change the organizational unit of the group created in the previous example, the syntax of the LDIF file is:
dn: DN_of_group_entry changetype: modify replace:labeledURI labeledURI:ldap:
//my_host/ou=MyNeworganizationalUnit,o=MyCompany,c=US??sub?(objectclass=person)
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. |
|