[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: dummy population [auf Viren überprüft]



> Hi!
>
> Does anyone have a ldif file or script to populate an OpenLDAP server
> with a an amount of ~15,000 dummy users (or more) for testing?
>
>
> Hans
>

If you want something simple.

Try this (note the printf line should be one line).  You'll have to modify
the basedn to fit your structure.  This will create an ldif for 15,000
users with the number as their cn, sn, and password.

#!/usr/local/bin/bash
for ((i=0;i<15000;i++))
do
printf "dn: cn=$i,ou=users,dc=yourdomain,dc=com\nobjectclass: person\ncn:
$i\nsn: $i\nuserPassword: $i\n\n" >> test.ldif
done