23.2. グループエントリーの例を使用した LDIF ファイルの作成

dsctl ldifgen groups コマンドを使用して、サンプルグループエントリーのある LDIF ファイルを作成します。たとえば、500 グループを ou=groups,dc=example,dc=com エントリーに追加し、各グループに 100 メンバーが含まれる /tmp/groups.ldif という名前の LDIF ファイルを作成するには、次のコマンドを実行します。
# 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
このコマンドは、LDIF 文を作成して、ou=People,dc=example,dc=com にユーザーエントリーを追加することに注意してください。
重要
大規模なグループを作成し、ldapmodif ユーティリティーを使用してグループを追加しようとすると、BER (Basic Encoding Rules) サイズ制限を超えており、インポートに失敗します。この場合は、cn=config エントリーの nsslapd-maxbersize パラメーターの値を増やします。
詳細と、LDIF ファイルの作成後に使用できるその他のオプションは、以下を入力します。
# dsctl instance_name ldifgen groups --help