Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP

Am 08.06.2004 um 18:29 Uhr haben Sie geschrieben: 
> On 8 Jun 2004, at 16:56, peter@adpm.de wrote: 
> > I\'d like to start with a code() method that tries to mimic 
the 
>> Net::LDAP one and 
>I assume you mean better error handling ? 
My first goal is having a code() method in Net::LDAP::LDIF. 
 
> > I\'d like to extend the 
> > Net::LDAP::Entry->update() method so that it takes a 
> > Net::LDAP::LDIF object as an argument. The latter one 
> > requires a bit of work in Net::LDAP::LDIF to make it 
> > correct. 
> Not sure about this one. ::LDIF returns ::Entry objects,  
> so I do not understand why you want to pass it to a single 
> entry object. Or did you mean extend Net::LDAP->update ? 
 
Sorry about being unclear. It is about writing, not about 
reading. 
Today you can update an entry on a server using 
   $entry->update($ldap); 
where $entry is a Net::LDAP::Entry object and $ldap is a 
Net::LDAP object. 
I want to extend this method so that you can pass it a 
Net::LDAP::LDIF object: 
   $entry->update($ldif); 
 
CU 
Peter 



0
peter5 (37)
6/9/2004 7:06:02 AM
perl.ldap 1268 articles. 0 followers. Follow

0 Replies
1135 Views

Similar Articles

[PageSpeed] 50

Reply:

Similar Artilces:

Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP #2
Hi, Am 09.06.2004 um 01:44 Uhr haben Sie geschrieben: > Extending Net::LDAP::Entry to update against LDIF and LDAP objects > could allow the changetype modifications to be to produced. > > This would be really useful to produce changetypes for entry objects by > updating against an LDIF object to produce the changetype LDIF required > up to synchronise entry objects. as Graham posted you can to that already now. Simply create your Net::LDAP::Entry object with the changes option set to TRUE. Having created the ::LDIF object that way you autom...

make Net::LDAP::LDIF more similar to Net::LDAP
Hi Graham, hi Chris, hi list, I would like to rework Net::LDAP::LDIF a bit so that its API resembles that of Net::LDAP a bit more while still keeping the traditional API. The reason for this is that in application I often need to distinguish between Net::LDAP and Net::LDAP::LDIF because some methods are only implemented on one side. I\'d like to start with a code() method that tries to mimic the Net::LDAP one and I\'d like to extend the Net::LDAP::Entry->update() method so that it takes a Net::LDAP::LDIF object as an argument. The latter one requires a...

[Fwd: make Net::LDAP::LDIF more similar to Net::LDAP]
--------------95D5815B06BDC2BD1A0ABFEB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit --------------95D5815B06BDC2BD1A0ABFEB Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mozilla-Status2: 00000000 Message-ID: <40C7B13E.8864E5A0@cs.adelaide.edu.au> Date: Thu, 10 Jun 2004 10:54:22 +1000 From: Sion Camilleri <sion@cs.adelaide.edu.au> Reply-To: sion@cs.adelaide.edu.au X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Graham Barr <gbarr@pobox.com>...

Net::LDAP and Net:LDAP::LDIF read & add problems
I'm trying to read in a simple LDIF file to add an entry to my LDAP server. Here is the basic routine (extraneous details omitted for brevity and security): $ldif = Net::LDAP::LDIF->new($tmp,"r",onerror => 'warn'); $entry = $ldif->ready_entry(); $ldap = Net::LDAP->new($LDAPSERVER); $result=$ldap->bind("$binddn",password=>"$bindpass",version=>"3"); $result=$ldap->add($entry); Now, everything seems to work until I get to the $ldap->add method. From that I get various versions of the following: object...

Net::LDAP and Net:LDAP::LDIF read & add problems #2
I'm trying to read in a simple LDIF file to add an entry to my LDAP server. Here is the basic routine (extraneous details omitted for brevity and security): $ldif = Net::LDAP::LDIF->new($tmp,"r",onerror => 'warn'); $entry = $ldif->ready_entry(); $ldap = Net::LDAP->new($LDAPSERVER); $result=$ldap->bind("$binddn",password=>"$bindpass",version=>"3"); $result=$ldap->add($entry); Now, everything seems to work until I get to the $ldap->add method. From that I get various versions of the following: obj...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Net::LDAP v0.28, bug in Net::LDAP::Constant, :all not supported
Net::LDAP::Constant no longer supports the :all tag in the export list due to the switch from Exporter to a manual export routine. So, while the following: perl -MNet::LDAP::Constant=:all -e 1 worked fine in 0.2701, it now dies with the error: ":all" is not exported by the Net::LDAP::Constant module at -e line 0 Can't continue after import errors at -e line 0 BEGIN failed--compilation aborted, <DATA> line 197. The documentation for Net::LDAP::Constant still documents the ':all' tag. I am not subscribed to the list, so if some...

Net::LDAP::LDIF re-correction
--Apple-Mail-3--281482799 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Hi! It seems, the problem is in my perl-experience.. I generated an =20 another, bigger bug with my change, the trailing '\n'-s of lines =20 wasn't removed.. So those lines wasn't equivalent at all :( I'm attaching a diff of my changes, which now works fine for me.. I hope, these changes do solve the problem with memory-files. Regards, Gergely PS: I know, I should post this to mailing-list, but as I mentioned in...

Net::LDAP based LDAP server available?
Hi, has anybody tried to build an LDAP server based on Net::LDAP or Convert::ASN1 yet? Thanks for any hint. Enrik ...

Net::LDAP & LDAP Decoding Error
--mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello! I have a question about an LDAP query with Net::LDAP. I send queries to an OpenLDAP server (version 2.2.24). The queries are very simple and intended to detect already existing user entries. The code that prepares and sends the query looks like this: $filter =3D "(uid=3D".$username.")"; $filterobj =3D Net::LDAP::Filter->new($filter); $lres =3D $ldap->search( base =3D> $base, s...

Subject: Re: HowTo retrieve a userCertificate;binary from ldif file using Net::LDAP::LDIF
------_=_NextPart_001_01C5F690.E3DCB4B6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chris thanks for the reply. =20 =20 >On 1/12/05 1:06, Rion, Bob <Bob_Rion[at]csgsystems.com> wrote: >=20 >> Hello >>=20 >> =20 >>=20 >> =20 >>=20 >> I am trying to extract a userCertificate;binary object from an ldif file >> using Net::LDAP::LDIF and even in this trivial example the [at]entries is >> not populated, the other objects and attributes are? >>=20 >...

Net::LDAPS and Net::SSLeay
------_=_NextPart_001_01C3EF1A.51A96530 Content-Type: text/plain Hello all: I am trying to use Net::LDAPS within a perl program in order to establish a secure socket connection with my ldap server. My program works fine if i use the bind function from Net::LDAP module. However, when I changed my source code to use the bind function from Net::LDAPS, my program failed because it complained about the need for IO::Socket::SSL module. Then, when i started to run make for IO::Socket::SSL, it complained about the need for Net::SSLeay. The compilation for Net::SSLeay versio...

Fwd: Re: Some feedback on Net::LDAP::LDIF...
--Boundary-00=_MkL5CQMvq7ZG1zn Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, since I did not get any feedback about the patch for D. Wood's issue of opening Windows-created LDIFs in Linux/Unix I am re-sending the patch. Please test and give me feedback ! Thanks in advance Peter ---------- Forwarded Message ---------- Subject: Re: Some feedback on Net::LDAP::LDIF... Date: Monday 27 June 2005 13:48 From: Peter Marschall <peter@adpm.de> To: perl-ldap@perl.org Cc: "Chris Ridd...

Re: Net::LDAP
Chris, The "jimbob" bind is to show that this will connect as anything, or at least not show an error no matter what I put into the Bind. I don't think I should have to use an SASL bind. From the command line I can do an ldapsearch with a user/password combo and everthing works the way I expect it to. Any other thoughts Scott >>> Chris Ridd <chrisridd@mac.com> 5/5/2006 3:38:47 AM >>> On 4/5/06 10:41, Scott Hegel <shegel@dakotagrowers.com> wrote: > Hi, > > I am wondering if someone can help me out. I am trying to u...

Re: changetype parsing bug in Net::LDAP::LDIF
Hi, I checked the examples with given in the original mail using the current version of Net::LDAP::LDIF in the subersion repository. Here are my results (for each entry it is the output of entry->dump() followed by the contents of $entry->changetype() and $entry->attributes()): ------------------------------------------------------------------------ dn:cn=Paul Jensen, ou=Product Development, dc=airius, dc=com newrdn: cn=Paula Jensen deleteoldrdn: 1 --- changetype: modrdn attributes: newrdn,deleteoldrdn ----------------------------------...

How do I retrieve operational attributes for an LDAP entry using Net::LDAP?
how do I retrieve the values for 'creatorsName','createTimestamp', 'modifiersName', 'modifyTimestamp' using Net::LDAP module? pleae help ===== use Net::LDAP; use Net::LDAP::Util qw(ldap_error_text ldap_error_name ldap_error_desc); $host='xxxx.com'; $rdn='cn=manager,dc=xxxx,dc=com'; $ldappasswd='123456'; my $ldap=new Net::LDAP($host) or die; my $mesg=$ldap->bind("$rdn",password=>"$ldappasswd",version => 3) or die; my $mesg=$ldap->search(base=>"ou=people,dc=xxxx,dc=com",scope=>...

Net::LDAP->root_dse() not returning an error (when LDAP server does)
Hello, I'm experimenting with "start_tls()" in Net::LDAP. The manual suggests to check the RootDSE for LDAPv3 and TLS extension. Somhow I managed that creating the LDAP object (i.e. connect) suceeds, but $ldap->root_dse() returns undef. Interesting to say that you cannot get much information out of an undef: May code fragment is this: sub start_TLS($$) { my ($ldap, $q) = @_; my $dse = $ldap->root_dse(); if ($dse && $dse->supported_version(3) && $dse->supported_extension(LDAP_EXTENSION_START_TLS)) { ...

Net::LDAP::LDIF should support LDIF comments
Hi, comments are an official part of LDIF, but the Perl module doesn't support them right now. RFC 2849 (LDAP Data Interchange Format) says on page 6: 3) Any line that begins with a pound-sign ("#", ASCII 35) is a comment line, and MUST be ignored when parsing an LDIF file. Why do I need that? I wrote an LDIF import utility that writes all entries that had an error into an LDIF output file for manual (or automatic) review. However it would be great to add the LDAP server's error messages as a comment in from of every entry. Code snipplet: .... ...

$ldap->search triggers Bug in ASN1 and utf8 Net::LDAP code
Dear perl programmers, I think I found bug in Net::LDAP in the part which is doing something with ASN.1 (Convert::ASN1). I'm writing small program for selecting and exporting part of oracle (with DBD::Oracle) doing nasty things with output, selecting from OpenLDAP server matching and non-matching entries and comparing them attribute by attribute, making ldif diff file from that, or producing new entries if $mesg->entries is 0. I'm not a professional programmer, but I *must* finish this application. :-( Output from oracle is in UTF-8, and it has many names with nati...

Re: Transactional Net::LDAP?
------_=_NextPart_001_01C83692.46090B37 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 T2xpdmVyLCBpcyB0aGlzIG9ubHkgYSBzaW5nbGUgbGRhcCBzZXJ2ZXIgb3IgZG9lcyBpdCByZXBs aWNhdGUgdG8gYWRkaXRpb25hbCBzeXN0ZW1zIGFuZCBpcyB0aGVyZSBldmVyIHRoZSBwb3NzaWJp bGl0eSB0d28gc2NyaXB0cyBjb3VsZCBiZSB1c2luZyBtb3JlIHRoYW4gb25lIG9mIHRoZSBzeXN0 ZW1zIGF0IG9uY2U/ICBJZiBzbyB5b3Ugd291bGQgbmVlZCBhIHNlcnZlciBzaWRlIHNvbHV0aW9u IGFzIHdlbGwgYXMgcG9zc2libHkgc29tZXRoaW5nIHdpdGggeW91ciBzY3JpcHQuIEEgc2ltcGxl IGhva2V5IHNvbHV0aW9uIGZvciBhIHNpbmdsZSBzZXJ2ZXIgd291bGQgYmUgdG8gdXNlIGFuIGF0 ...

Net::LDAP
I'm a bit new to Perl. We are wanting to use it to accomplish scripting involved with accessing and manipulating an Oracle Internet Directory and a couple other ldap databases. Has anyone installed (and used successfully) the Net::LDAP package? If so, what was needed to get it to work. I installed the prerequisite Convert::ASN1 module. I am working with perl-ldap 0.3202 and perl revision 5.0, version 6, subversion 1. I will include the output from perl -"V" at the end of this message for anyone who might find this useful. I have installed Net::LDAP according to t...

Net::LDAP::LDIF correction
--Apple-Mail-1--281494635 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Hi! Sorry for bothering, but I don't know, which other way should I =20 report this "bug" I found... The reason I report it directly to you is, that I also solved it. The =20= problem is the following: In the project, I'm working on, I needed to parse an LDIF buffer =20 present in memory. Module Net::LDAP::LDIF is working with files, so I =20= opened a memory-file, and passed it's filehandle to this module, but =...

Net::LDAP
Hello, Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ INC (@INC includes /usr/lib/perl5/5.6.1 etc, etc etc, etc. Thanks - Susan P.S - No, I am not a Student. On 11/3/03 5:17 pm, Susan Aurand <saurand@haywood.k12.nc.us> wrote: > Hello, > Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ > INC (@INC includes > /usr/lib/perl5/5.6.1 etc, etc etc, etc. How did you install perl-ldap? What is your complete @INC variable, and where on your box is LDAP.pm? > Thanks - Susan > P.S - No, I ...

Net::LDAP::LDIF usage
Hi, We are currently using Net::LDAP::LDIF module to transfer infos from an openldap server to an AD ldap server. We are importing the ldif using a Windows command called ldifde. Our problem is that ldifde needs some formatting characters between each modification using changetype: modify. It needs a single dash alone on a line following the modified entry to work. Is there a clean way to do this with Net::LDAP::LDIF ? (I have seen some dashes in the RFC but did not yet take time to read it intensively). Julien Garet INRIA Lille --=====================_5...

Web resources about - Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP - perl.ldap

Resources last updated: 2/19/2016 9:36:29 AM