Menu Close
Settings Close

Language and Page Formatting Options

23.2. Creating an LDIF File with Example Group Entries

Use the dsctl ldifgen groups command to create an LDIF file with example group entries. For example, to create an LDIF file named /tmp/groups.ldif that adds 500 groups to the ou=groups,dc=example,dc=com entry, and each group has has 100 members, enter:
# dsctl instance_name ldifgen groups --number 500 --suffix "dc=example,dc=com" --parent "ou=groups,dc=example,dc=com" --num-members 100 --create-members --member-parent "ou=People,dc=example,dc=com" --ldif-file /tmp/group.ldif example
Note that the command also creates LDIF statements to add the user entries in ou=People,dc=example,dc=com.


If you create large groups and try to add the group using the ldapmodif utility, you can exceed the maximum Basic Encoding Rules (BER) size limit, and the import fails. In this case, increase the value of the nsslapd-maxbersize parameter in the cn=config entry.
For further details and other options you can use after you create the LDIF file, enter:
# dsctl instance_name ldifgen groups --help