473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Adding OU to Open LDAP Server

Hi,

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.

Regards,

Bruno Marinho
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Oct 3 '08 #1
1 5980
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate...
2
by: Micha³ Kurowski | last post by:
Hi, I'd like to ask you whether anyone have built python-ldap against Sun ONE Directory v5.2 on a Solaris 9. Seems developers do not support such config, but many places on the web suggest it...
0
by: Durairaj Avasi | last post by:
Here is my prg:::: use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR); use Authen::SASL; use Net::LDAP::Util qw(ldap_error_name ldap_error_text); sub lConnect { my $server = shift; print "...
7
by: Amar | last post by:
I am trying to connect to my college LDAP directory using ASP.NET. This LDap does not have security as it returns only user demographic information. i do not need to bind with a username or...
2
by: Mathias Alvarsson | last post by:
In the creation-process of the new user, I also wan't to add it to a group that exists in another domain in the same forrest. When I try this I get these error-messages: "The object was not found...
4
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net...
5
by: Bryan | last post by:
Hello, I have a asp.net app working with directory services on my Windows XP development machine. However when I moved the application over to our production server (Win 2000 Server) it no longer...
3
by: RJN | last post by:
Hi I've written a code that queries Windows LDAP server and works fine, but the same doesn't work when querying Solaris LDAP server. DirectoryEntry de = new...
0
by: jc | last post by:
I'm attempting this code: using System; using System.Collections.Generic; using System.Text; using System.DirectoryServices; namespace cLDAP { public class Program
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.