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