17.2. サンプルユーザーエントリーを使用した LDIF ファイルの作成

dsctl ldifgen users コマンドを使用して、サンプルユーザーエントリーのある LDIF ファイルを作成します。

手順

  1. 例えば、dc=example,dc=com 接尾辞に 100,000 人の一般ユーザーを追加する /tmp/users.ldif という名前の LDIF ファイルを作成するには、次のように入力します。

    # dsctl instance_name ldifgen users --suffix "dc=example,dc=com" --number 100000 --generic --ldif-file=/tmp/users.ldif

    このコマンドは、以下の組織単位 (OU) を作成し、ユーザーをこれらの OU にランダムに割り当てることに注意してください。

    • ou=accounting
    • ou=product development
    • ou=product testing
    • ou=human resources
    • ou=payroll
    • ou=people
    • ou=groups

      詳細と、LDIF ファイルの作成に使用できるその他のオプションについては、以下を入力します。

      # dsctl instance_name ldifgen users --help
  2. オプション: テスト項目をディレクトリーに追加します。

    # ldapadd -D "cn=Directory Manager" -W -H ldap://server.example.com -x -c -f /tmp/users.ldif