Skip to main content

To accompany the cool LDIF creator tool here:

https://www.netiq.com/communities/cool-solutions/cool_tools/easily-generate-ldif-file-testing/

I’ve made this little perl script to add them to groups in OUD to do some load testing / timings. Thought others might want it to start from:

 

#!/usr/bin/perlopen FILE, “>roles.ldif” or die $!;$rolesToMake = 9;$membercount = 75000;while ($i <= $rolesToMake) {$i = $i + 1;$role = “rlIter3role”.$i;print FILE “dn: cn=”.$role.”,ou=Roles,dc=cchmc,dc=stg\n”;print FILE “objectclass: orclIDXGroup\n”;print FILE “objectclass: groupOfUniqueNames\n”;print FILE “objectclass: top\n”;print FILE “cn: “.$role.”\n”;print FILE “businesscategory: Default\n”;print FILE “description: “.$role.”\n”;print FILE “displayname: “.$role.”\n”;while ($x <= $membercount){$x = $x + 1;$memberID = 1000000 + $x;print FILE “uniquemember: cn=”.$memberID.”,ou=TEST,ou=Research,dc=cchmc,dc=stg\n”;}$x = 0;print FILE “\n”;}close FILE or die $!