By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Adding OU to Open LDAP Server

P: n/a

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 = ldap_add($ad,"OU=teste,OU=HPA,OU=Utilizadores,DC=s ubdomain,DC=domain,DC=com",$newou);

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 = ldap_add($ad,"OU=teste,OU=HPA,OU=Utilizadores,DC=s ubdomain,DC=domain,DC=com",$ newou));

Can u tell me what i'm doing wrong?

Thanks for your help people.


Bruno Marinho
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from =-

Oct 3 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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

Oct 3 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.