Adding OU to Open LDAP Server

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I'm having a problem creating an OU entry on a Open LDAP Server. I'm using the
code below.

$ad = ldap_connect("ldap://srvldap");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind($ad,"CN=Admin,DC=subdomain,DC=domain,DC=com","secret");

$newou["objectClass"][0] = "top";
$newou["objectClass"][1] = "organizationalUnit";
$newou["ou"] = "myou";
$sync =

Then i'm getting a warning message:

Warning: ldap_add() [function.ldap-add]: Add: Undefined attribute type in
/var/www/project/ou_insert.php on line 85 -> Corresponds to ($sync =

Can u tell me what i'm doing wrong?

Thanks for your help people.


Bruno Marinho

--------  Binary Usenet downloading made easy =---------
-=  Get GrabIt for free from =-

Re: Adding OU to Open LDAP Server

Sorry guys,

The warning i'm getting with the supplied code is:

Warning: ldap_add() [function.ldap-add]: Add: Invalid syntax in
/var/www/LDAPSync/ou_insert.php on line 87

Can anyone tell me what is wrong?

Thanks again,

Bruno Marinho

Site Timeline