13.3. グループエントリーの例を使用した 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/groups.ldif example_group__このコマンドは、LDIF 文を作成して、
ou=People,dc=example,dc=comにユーザーエントリーを追加することに注意してください。詳細と、LDIF ファイルの作成に使用できるその他のオプションは、以下を入力します。
# dsctl <instance_name> ldifgen groups --helpオプション: テスト項目をディレクトリーに追加します。
# ldapadd -D "cn=Directory Manager" -W -H ldap://server.example.com -x -c -f /tmp/groups.ldif