/usr/share/php/data/turba/scripts/ldap/addou.pl is in php-horde-turba 4.1.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #!/usr/bin/perl -w
#
# LDAP add personal ou's from /home
# This script adds an ou for each directory in /home.
#
# Script by tarjei@nu.no.
# Remember to remove ou's like mailman, mysql, postgres, etc.
# Settings that should be changed for your setup:
$basedn = "ou=personal_addressbook, dc=example, dc=com";
$binddn = "uid=root, ou=People, dc=example, dc=com";
$passwd = "";
# End of configuration section - don't edit below here.
use Getopt::Std;
my %Options;
$user = $ARGV[0];
print "Adding ou: ou=$user,$basedn";
$FILE = "|/usr/bin/ldapadd -x $options -D '$binddn' -w $passwd";
open FILE or die;
print FILE <<EOF;
dn: ou=$user,$basedn
objectclass: top
objectClass: organizationalUnit
ou: $user
EOF
close FILE;
exit 0;
|