You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(200) |
Jun
(129) |
Jul
(184) |
Aug
(204) |
Sep
(106) |
Oct
(79) |
Nov
(72) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(83) |
Feb
(123) |
Mar
(84) |
Apr
(184) |
May
(106) |
Jun
(111) |
Jul
(104) |
Aug
(91) |
Sep
(59) |
Oct
(99) |
Nov
(100) |
Dec
(37) |
2002 |
Jan
(148) |
Feb
(88) |
Mar
(85) |
Apr
(151) |
May
(80) |
Jun
(110) |
Jul
(85) |
Aug
(43) |
Sep
(64) |
Oct
(89) |
Nov
(59) |
Dec
(42) |
2003 |
Jan
(129) |
Feb
(104) |
Mar
(162) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Graham B. <gb...@po...> - 2000-09-11 18:34:40
|
PLease try the attached patch. Graham. |
From: Graham B. <gb...@po...> - 2000-09-11 18:24:15
|
Is it possible to get the server to do a full PDU dump so we can compare the PDUs send by ldapsearch and Net::LDAP ? Graham. On Mon, Sep 11, 2000 at 11:08:19AM -0700, Jeff Mandel wrote: > Correct summary on the sorts. > > My log from LDAP for successful sort shows > [11/Sep/2000:09:44:33 -0700] conn=2040 fd=56 slot=56 connection from > 10.1.8.10 to 10.1.2.5 > [11/Sep/2000:09:44:33 -0700] conn=2040 op=0 SRCH > base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 > filter="(&(objectclass=iphost)(uid=*)(objectclass=mpdevice))" > [11/Sep/2000:09:44:33 -0700] conn=2040 op=0 SORT uid devicefunction status > (275) > [11/Sep/2000:09:44:34 -0700] conn=2040 op=0 RESULT err=0 tag=101 > nentries=222 etime=1 > [11/Sep/2000:09:44:34 -0700] conn=2040 op=-1 fd=56 closed - B1 > > Log for failed sort is: > [11/Sep/2000:09:48:16 -0700] conn=2041 fd=56 slot=56 connection from > 10.1.8.10 to 10.1.2.5 > [11/Sep/2000:09:48:16 -0700] conn=2041 op=0 SRCH > base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 > filter="(&(objectclass=iphost)(uid=*)(objectclass=mpdevice))" > [11/Sep/2000:09:48:16 -0700] conn=2041 op=0 RESULT err=2 tag=101 nentries=0 > etime=0 > [11/Sep/2000:09:48:16 -0700] conn=2041 op=-1 fd=56 closed - B1 > > The sort request was somehow lost. No entries returned, nothing was logged > to the LDAP error log either. > > An error code was not returned to Net::LDAP, ie no response. So using the > example, I get "Server does not support sorting." > Should it return an error 2? > > Using the command line ldapsearch from the Netscape LDAP sdk I can get a > reverse sort. > ./ldapsearch -h host -b "ou=eugene,ou=computers,ou=devices,o=probes" -x -S > -uid uid=* uid cn > [11/Sep/2000:10:55:06 -0700] conn=2084 fd=56 slot=56 connection from > 10.1.8.10 to 10.1.2.5 > [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 SRCH > base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 filter="(uid=*)" > [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 SORT -uid (223) > [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 RESULT err=0 tag=101 > nentries=222 etime=0 > [11/Sep/2000:10:55:06 -0700] conn=2084 op=1 UNBIND > [11/Sep/2000:10:55:06 -0700] conn=2084 op=1 fd=56 closed - U1 > > So perhaps it's in the encoding... Maybe the regex in Sort.pm is dropping a > piece of the request, including the sort order request instead of handling > the "-" > > Perhaps in here (from Sort.pm)... > > unless (defined $self->{value}) { > $self->{value} = $SortRequest->encode( > order => [ > map { > /^(-)?([^:]+)(?::(.+))?/; > { > type => $2, > (defined $1 ? (reverseOrder => 1) : ()), > (defined $3 ? (orderingRule => $3) : ()) > } > } @{$self->{order} || []} > ] > ) or $self->{error} = $@; > } > > > I wish my regex's skills we enough to help out here, but I have to defer to > the list on this. > > Jeff > > Graham Barr wrote: > > > Mark Wilcox had reported something similar (I had forgot about it) > > > > Are you saying > > > > forward sort on a single attribute works > > forward sort on a multiple attributes works > > reverse sort on a single attribute fails > > reverse sort on multipe attributes fails > > > > If so then it looks like the encoding of the reverse flag. But > > I looked at this when Mark reported the problem and the PDUs > > looked to be encoded OK. > > > > So the other question is does Netscape support reverse sorts ? > > > > Graham. > > > > On Mon, Sep 11, 2000 at 08:47:43AM -0700, Jeff Mandel wrote: > > > Hello, > > > > > > Has anyone successfully made the Netscape LDAP server return a reverse > > > sort? Regular or multi-key sort using the examples in > > > LDAP::Control::Sort, and Net::LDAP::Control::SortResult work great, but > > > passing in a "-attribute" (like "-uid") returns a "Server does not > > > support sorting." > > > > > > I'm using Netscape Directory 4.1 > > > > > > Thanks, > > > > > > Jeff > > > > |
From: Jeff M. <jef...@pr...> - 2000-09-11 18:08:23
|
Correct summary on the sorts. My log from LDAP for successful sort shows [11/Sep/2000:09:44:33 -0700] conn=2040 fd=56 slot=56 connection from 10.1.8.10 to 10.1.2.5 [11/Sep/2000:09:44:33 -0700] conn=2040 op=0 SRCH base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 filter="(&(objectclass=iphost)(uid=*)(objectclass=mpdevice))" [11/Sep/2000:09:44:33 -0700] conn=2040 op=0 SORT uid devicefunction status (275) [11/Sep/2000:09:44:34 -0700] conn=2040 op=0 RESULT err=0 tag=101 nentries=222 etime=1 [11/Sep/2000:09:44:34 -0700] conn=2040 op=-1 fd=56 closed - B1 Log for failed sort is: [11/Sep/2000:09:48:16 -0700] conn=2041 fd=56 slot=56 connection from 10.1.8.10 to 10.1.2.5 [11/Sep/2000:09:48:16 -0700] conn=2041 op=0 SRCH base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 filter="(&(objectclass=iphost)(uid=*)(objectclass=mpdevice))" [11/Sep/2000:09:48:16 -0700] conn=2041 op=0 RESULT err=2 tag=101 nentries=0 etime=0 [11/Sep/2000:09:48:16 -0700] conn=2041 op=-1 fd=56 closed - B1 The sort request was somehow lost. No entries returned, nothing was logged to the LDAP error log either. An error code was not returned to Net::LDAP, ie no response. So using the example, I get "Server does not support sorting." Should it return an error 2? Using the command line ldapsearch from the Netscape LDAP sdk I can get a reverse sort. ./ldapsearch -h host -b "ou=eugene,ou=computers,ou=devices,o=probes" -x -S -uid uid=* uid cn [11/Sep/2000:10:55:06 -0700] conn=2084 fd=56 slot=56 connection from 10.1.8.10 to 10.1.2.5 [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 SRCH base="ou=eugene,ou=computers,ou=devices,o=probes" scope=2 filter="(uid=*)" [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 SORT -uid (223) [11/Sep/2000:10:55:06 -0700] conn=2084 op=0 RESULT err=0 tag=101 nentries=222 etime=0 [11/Sep/2000:10:55:06 -0700] conn=2084 op=1 UNBIND [11/Sep/2000:10:55:06 -0700] conn=2084 op=1 fd=56 closed - U1 So perhaps it's in the encoding... Maybe the regex in Sort.pm is dropping a piece of the request, including the sort order request instead of handling the "-" Perhaps in here (from Sort.pm)... unless (defined $self->{value}) { $self->{value} = $SortRequest->encode( order => [ map { /^(-)?([^:]+)(?::(.+))?/; { type => $2, (defined $1 ? (reverseOrder => 1) : ()), (defined $3 ? (orderingRule => $3) : ()) } } @{$self->{order} || []} ] ) or $self->{error} = $@; } I wish my regex's skills we enough to help out here, but I have to defer to the list on this. Jeff Graham Barr wrote: > Mark Wilcox had reported something similar (I had forgot about it) > > Are you saying > > forward sort on a single attribute works > forward sort on a multiple attributes works > reverse sort on a single attribute fails > reverse sort on multipe attributes fails > > If so then it looks like the encoding of the reverse flag. But > I looked at this when Mark reported the problem and the PDUs > looked to be encoded OK. > > So the other question is does Netscape support reverse sorts ? > > Graham. > > On Mon, Sep 11, 2000 at 08:47:43AM -0700, Jeff Mandel wrote: > > Hello, > > > > Has anyone successfully made the Netscape LDAP server return a reverse > > sort? Regular or multi-key sort using the examples in > > LDAP::Control::Sort, and Net::LDAP::Control::SortResult work great, but > > passing in a "-attribute" (like "-uid") returns a "Server does not > > support sorting." > > > > I'm using Netscape Directory 4.1 > > > > Thanks, > > > > Jeff > > |
From: Graham B. <gb...@po...> - 2000-09-11 16:08:06
|
Mark Wilcox had reported something similar (I had forgot about it) Are you saying forward sort on a single attribute works forward sort on a multiple attributes works reverse sort on a single attribute fails reverse sort on multipe attributes fails If so then it looks like the encoding of the reverse flag. But I looked at this when Mark reported the problem and the PDUs looked to be encoded OK. So the other question is does Netscape support reverse sorts ? Graham. On Mon, Sep 11, 2000 at 08:47:43AM -0700, Jeff Mandel wrote: > Hello, > > Has anyone successfully made the Netscape LDAP server return a reverse > sort? Regular or multi-key sort using the examples in > LDAP::Control::Sort, and Net::LDAP::Control::SortResult work great, but > passing in a "-attribute" (like "-uid") returns a "Server does not > support sorting." > > I'm using Netscape Directory 4.1 > > Thanks, > > Jeff > |
From: Jeff M. <jef...@pr...> - 2000-09-11 15:47:48
|
Hello, Has anyone successfully made the Netscape LDAP server return a reverse sort? Regular or multi-key sort using the examples in LDAP::Control::Sort, and Net::LDAP::Control::SortResult work great, but passing in a "-attribute" (like "-uid") returns a "Server does not support sorting." I'm using Netscape Directory 4.1 Thanks, Jeff |
From: <ms...@ma...> - 2000-09-11 08:07:32
|
hi folks, recently i got this code: LDAP_LOCAL_ERROR the ldap server is working properly, but i just can't do anything to it (add/remove entries) with my perl script. (the script worked fine on another web server). what is the likely problem for this? and also, where can i find guidelines for writng very portable perl scripts? i am a newbie. thanks a lot! manuel. _____________________________________________________________ Global Virtual Desktop Get your free Desktop at http://www.magicaldesk.com |
From: Jurgen B. <ju...@bo...> - 2000-09-10 16:23:44
|
Calling Entry->update when nothing has changed dies with: Can't call method "modify" on an undefined value at /usr/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 204. Net::LDAP::Entry::update('Net::LDAP::Entry=HASH(0x85bea8c)') called at ... This should probably either silently do nothing or return some appropriate result code. - Jurgen |
From: Jim H. <ha...@us...> - 2000-09-08 20:48:05
|
Cliff, the FAQ is a marvelous start. I have several comments. I had intended to supply specifics to back up "whay not answer XXX", but have been running on total overload. I hope to send good answers to those questions in a few days (I am booked solid for the next 3). The term CVS repository should be defined. The last part of the answer to the question about "where did my seearch results go" is confusing (assignment to scalar stuff). I have ideas to fix it. New questions: (following What is a Directory) How does a directory differ from a relational database? (following How can I tell when the server returns an error) How do I know if a password is correct? How do I serach a directory? (following How do I limit the scope) How do I only pull back a few attributes on my search? How do I visit a large number of records using a reasonable amount of memory? Why is Net::LDAP slow? --Jim Harle |
From: Jurgen B. <ju...@bo...> - 2000-09-08 16:12:29
|
Mark Wilcox wrote: > You can't use a standard modify to just change the DN of the entry. You > must do a modrdn (can't remember if that's in the current api or not, > check the docs). It is, $ldap->moddn. This works now to changed the RDN. However, I also need to be able to change the superior, and Netscape Dir Server 4.11 barfs on $ldap->moddn($dn, 'newsuperior' => $newsuper) with: Error: LDAP_PARAM_ERROR -- An invalid parameter was specified > If you want to use modify to change the dn of an entry, you must copy all > of the attributes from the old entry into an Entry object, set the new dn > and then add that object to the server. Ok, makes sense... I gather being able to change the superior is not an LDAP v3 requirement. So I have to do as you say, and the following works nicely and is simple enough: $result = $ldap->search( ... $base=$olddn ...) $entry = $result->shift_entry; $entry->dn($newdn); $ldap->delete($olddn); $ldap->add($entry); (At least in my case I must do the delete before the add because some of the attributes have indexes that require them to be globally unique). Thanks to Graham and Mark for the help! - Jurgen |
From: Mark W. <mew...@un...> - 2000-09-08 14:18:13
|
That might have been one of them, but I think there was something about determing whether something was structural or auxilary. Mark On Fri, 8 Sep 2000, Graham Barr wrote: > On Fri, Sep 08, 2000 at 08:40:22AM -0500, Mark Wilcox wrote: > > The reason why there isn't any schema stuff yet is because we need a > > couple of methods added to the Net::LDAP::Schema module (can't remember > > off the top of my head what they are,:( ). > > I think you wanted the ability to pass just the Net::LDAP::Entry, which > you can now do. > > Graham. > > > If you want to tackle schema in DSML, go right ahead. I thought I would be > > doing more with DSML by now but other projects keep getting in the way. > > > > Mark > > > > On Fri, 8 Sep 2000, Roman Baumer wrote: > > > > > I've just tried out the Net::LDAP::DSML package. Then I found out there is now > > > way to unload the Schema to the dtd at the moment. I'm a very newby in DSML > > > (who's not?), but my perl style should not be very bad. Therefore, if one of you > > > need any help, I probably can take the time to support you in the DSML stuff. > > > > > > Roman > > > > > > > > |
From: Graham B. <gb...@po...> - 2000-09-08 14:03:29
|
They are probably sorted this way because they are stored a strings on the server. I do not know if there is a special OID you could use to control the sort of IP addresss, but I would guess there is not. Graham. On Wed, Sep 06, 2000 at 03:06:47PM -0700, Jeff Mandel wrote: > In sorting a return list from LDAP of hostnames and IP addresses, the > sort order falls to the old standard that 2 is greater than 19. > ie "Sorted by iphostnumber appears in this order" > Host 18: 10.1.16.18 > Host 19: 10.1.16.19 > Host 2: 10.1.16.2. > > Likewise you get > 10.1.16.1 > 10.1.16.10 > 10.1.16.11 > 10.1.16.2 > > instead of > 10.1.16.1 > 10.1.16.2 > 10.1.16.10 > 10.1.16.11 > > Perl is handy at sorting things the way most folks want to see them, but > since we're taking advantage of LDAP server sorts, is there some special > way to call the sort so numbers sort in order? > > Thanks, > > Jeff > > > |
From: Graham B. <gb...@po...> - 2000-09-08 14:02:09
|
On Fri, Sep 08, 2000 at 08:40:22AM -0500, Mark Wilcox wrote: > The reason why there isn't any schema stuff yet is because we need a > couple of methods added to the Net::LDAP::Schema module (can't remember > off the top of my head what they are,:( ). I think you wanted the ability to pass just the Net::LDAP::Entry, which you can now do. Graham. > If you want to tackle schema in DSML, go right ahead. I thought I would be > doing more with DSML by now but other projects keep getting in the way. > > Mark > > On Fri, 8 Sep 2000, Roman Baumer wrote: > > > I've just tried out the Net::LDAP::DSML package. Then I found out there is now > > way to unload the Schema to the dtd at the moment. I'm a very newby in DSML > > (who's not?), but my perl style should not be very bad. Therefore, if one of you > > need any help, I probably can take the time to support you in the DSML stuff. > > > > Roman > > > > |
From: <ba...@ta...> - 2000-09-08 13:51:20
|
I'll see how much time I have to do some stuff. Therefore I'll provide you with the pieces of code when some coding is done. Roman Mark Wilcox wrote: > > The reason why there isn't any schema stuff yet is because we need a > couple of methods added to the Net::LDAP::Schema module (can't remember > off the top of my head what they are,:( ). > > If you want to tackle schema in DSML, go right ahead. I thought I would be > doing more with DSML by now but other projects keep getting in the way. > > Mark > > On Fri, 8 Sep 2000, Roman Baumer wrote: > > > I've just tried out the Net::LDAP::DSML package. Then I found out there is now > > way to unload the Schema to the dtd at the moment. I'm a very newby in DSML > > (who's not?), but my perl style should not be very bad. Therefore, if one of you > > need any help, I probably can take the time to support you in the DSML stuff. > > > > Roman > > |
From: Mark W. <mew...@un...> - 2000-09-08 13:45:52
|
The reason why there isn't any schema stuff yet is because we need a couple of methods added to the Net::LDAP::Schema module (can't remember off the top of my head what they are,:( ). If you want to tackle schema in DSML, go right ahead. I thought I would be doing more with DSML by now but other projects keep getting in the way. Mark On Fri, 8 Sep 2000, Roman Baumer wrote: > I've just tried out the Net::LDAP::DSML package. Then I found out there is now > way to unload the Schema to the dtd at the moment. I'm a very newby in DSML > (who's not?), but my perl style should not be very bad. Therefore, if one of you > need any help, I probably can take the time to support you in the DSML stuff. > > Roman > |
From: Mark W. <mew...@un...> - 2000-09-08 13:41:27
|
You can't use a standard modify to just change the DN of the entry. You must do a modrdn (can't remember if that's in the current api or not, check the docs). If you want to use modify to change the dn of an entry, you must copy all of the attributes from the old entry into an Entry object, set the new dn and then add that object to the server. Mark On Thu, 7 Sep 2000, Jurgen Botz wrote: > So I wrote simple little program to change the dn of an entry > (attached), and first it fails as follows: > > $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ > uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel > > Can't call method "modify" on an undefined value at > /usr/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 200 > > This seems to be because I call $entry->update without any args, > but the manual sez: > CLIENT is only optional if the Net::LDAP::Entry object was created > by a search on a directory server. In which case, if omitted, the > update will be sent back to the same server. > > Well, whatever, maybe this doesn't hold for changed dn's so, I give > it an explicit $entry->update($ldap). Now I get: > > $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ > uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel > > Can't use an undefined value as an ARRAY reference at > /usr/lib/perl5/site_perl/5.005/Net/LDAP.pm line 313. > > This seems to be because Net::LDAP->modify doesn't know its change > type. Adding an explicit $entry->changetype('modify') to my script > gets me further, but shouldn't the fact that I changed the dn have > tipped it off? > > Anyway, now my program runs all the way through and produces the > following error: > > Error: LDAP_PROTOCOL_ERROR -- Unrecognized version number or incorrect > PDU structure > > Right now I'm pretty clueless what this could mean. All I'm trying > to do at the moment is change the RDN! (On a Netscape 4.11 server, > and the OpenLDAP ldapmodrdn(1) program works fine.) > > - Jurgen > > > |
From: Graham B. <gb...@po...> - 2000-09-08 12:04:27
|
On Fri, Sep 08, 2000 at 01:28:44PM +0200, Roman Baumer wrote: > I've just tried out the Net::LDAP::DSML package. Then I found out there is now > way to unload the Schema to the dtd at the moment. I'm a very newby in DSML > (who's not?), but my perl style should not be very bad. Therefore, if one of you > need any help, I probably can take the time to support you in the DSML stuff. Feel free to send any patches. Others can always send patches to your patches if better solutions are found Thanks, Graham. |
From: <ba...@ta...> - 2000-09-08 11:28:06
|
I've just tried out the Net::LDAP::DSML package. Then I found out there is now way to unload the Schema to the dtd at the moment. I'm a very newby in DSML (who's not?), but my perl style should not be very bad. Therefore, if one of you need any help, I probably can take the time to support you in the DSML stuff. Roman |
From: Graham B. <gb...@po...> - 2000-09-08 10:23:44
|
On Fri, Sep 08, 2000 at 10:57:33AM +0100, Hea...@dr... wrote: > > Sorry there is no code with this, the bind is dead simple Net::LDAP bind > > with odd dn=> and password=> fields, so no point. The plugin is C code > > and kind of proprietary so can't post that either... Is there a debug option in Netscape to dump all received PDUs ? It would be interesting to see the difference between the Java and Net::LDAP bind PDUs Graham. |
From: <Hea...@dr...> - 2000-09-08 09:58:10
|
> A bit off topic but still worth a try. > > Has anyone had problems with binds to Netscape LDAP servers when upgrading > from 4.0 to 4.1? > > I use PKCS#7 encapsulated signed tokens to bind to a Netscape LDAP server > with Net::LDAP (non SSL connections) using a custom preop bind plugin. > The bind operation passes the PKCS#7 object as the binddn (containing a > digitally signed token and the signing certificate and the base DN of the > server) and the plaintext token as password. The plugin then uses the > cert serial no. to find the LDAP entry and cert stored there, decodes the > signed token, compares it to the plaintext, if all matches then binds as > that account. Whew! > > After upgrading to 4.1 the bind operations fail if there is a Netscape > console bound to the server and succeed otherwise. I repeat it only > happens when a console is bound to the server (it took me three days to > track that down as it was intermittent with no apparent rhyme or reason, > great when you have 5-6 developers using the same box hey?) > > Debug logs show that the bind operation is "lost" by the slapd process and > the plugin is never called. I'm guessing it is being interpreted as an > attempt at an SSL connection but thrown away because it doesn't match the > format expected. There is no error returned. > > Only Net::LDAP connections are lost, the same general process with JAVA > based binding works fine and is accepted by the slapd process as a bind > and passed to the preop plugin. > > Has anyone else come across similar problems? I'm guessing it comes down > to Netscape enabling SSL connections from their console that has never > worked properly anyway and is probably using an undocumented interface > that is screwing this up. > > Sorry there is no code with this, the bind is dead simple Net::LDAP bind > with odd dn=> and password=> fields, so no point. The plugin is C code > and kind of proprietary so can't post that either... > > Thanks in advance, > > Heath. -------------------------------------------------------------------------------- This email and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. If you have received this email in error please destroy it and contact the sender, via our switchboard on +44 (0)20 7623 8000 or via return e-mail. You should not copy, forward or use the contents, attachments or information in any way. Any unauthorised use or disclosure may be unlawful. Dresdner Kleinwort Benson gives no warranty as to the accuracy or completeness of this email after it is sent over the Internet and accepts no responsibility for changes made after it was sent. Any opinion expressed in this email may be personal to the author and may not necessarily reflect the opinions of the Bank or its affiliates. They may also be subject to change without notice. -------------------------------------------------------------------------------- |
From: Graham B. <gb...@po...> - 2000-09-08 09:29:10
|
On Thu, Sep 07, 2000 at 11:03:29PM -0700, Jurgen Botz wrote: > So I wrote simple little program to change the dn of an entry > (attached), and first it fails as follows: > > $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ > uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel > > Can't call method "modify" on an undefined value at > /usr/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 200 > > This seems to be because I call $entry->update without any args, > but the manual sez: > CLIENT is only optional if the Net::LDAP::Entry object was created > by a search on a directory server. In which case, if omitted, the > update will be sent back to the same server. Ah, this needs to be removed from the docs. It may have just been an original intention. > Well, whatever, maybe this doesn't hold for changed dn's so, I give > it an explicit $entry->update($ldap). Now I get: yes that is right. > $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ > uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel > > Can't use an undefined value as an ARRAY reference at > /usr/lib/perl5/site_perl/5.005/Net/LDAP.pm line 313. > > This seems to be because Net::LDAP->modify doesn't know its change > type. Adding an explicit $entry->changetype('modify') to my script > gets me further, but shouldn't the fact that I changed the dn have > tipped it off? No, this should be trapped. You cannot change a dn in this way, you can only change attributes. So ->update should of done nothing but return an error. > Anyway, now my program runs all the way through and produces the > following error: > > Error: LDAP_PROTOCOL_ERROR -- Unrecognized version number or incorrect > PDU structure > > Right now I'm pretty clueless what this could mean. All I'm trying > to do at the moment is change the RDN! (On a Netscape 4.11 server, > and the OpenLDAP ldapmodrdn(1) program works fine.) Well try using $ldap->moddn( $entry->dn, newrdn => $newrdn ); Graham. |
From: Graham B. <gb...@po...> - 2000-09-08 09:21:42
|
0.21 which I will try to release today will put ->get back to how it was in 0.19 However it will also depricate ->get in favor of a new method ->get_value which should be better Graham. On Thu, Sep 07, 2000 at 04:38:33PM -0500, Mark Wilcox wrote: > Actually I just reread your code. the problem is that in .20, get always > returns back an array context. > > you need to do > print " $attr : ",@$entr->get($attr),"\n"; > > Mark > On Thu, 7 Sep 2000, Mark Weixel wrote: > > > Greetings, > > > > I installed perl-ldap .20 today in order to experiment with > > Net::LDAP::Control::Sort (turns out my server doesn't support > > sorting...) Unfortunately, after doing this, the sample code that I had > > copied from the Examples page stopped dereferencing the information in > > the individual entry references. > > > > I'm doing this under Win32, using ActiveState Perl build 617. > > ActivePerl's PPM only has perl-ldap .15, so I downloaded the > > distribution at SourceForge and installed by hand using NMake. > > > > As a result, the following: > > > > use strict; > > use Net::LDAP; > > use vars qw($ldap $mesg $entry); > > > > > > > > $ldap = Net::LDAP->new('ucis-nt.ucis.pitt.edu:389') or die "$@"; > > > > $ldap->bind ; # an anonymous bind > > > > $mesg = $ldap->search ( # perform a search > > base => "c=US", > > scope => 'sub', > > filter => "(|(objectClass=organizationalPerson))" > > ); > > > > $mesg->code && die $mesg->error; > > #print $mesg->control; > > #my @entries = $mesg->entries; > > > > > > #------------ > > # > > # handle each of the results independently > > # ... i.e. using the walk through method > > # > > my @entries = $mesg->entries; > > > > my $entr ; > > foreach $entr ( @entries ) > > { > > print "DN: ",$entr->dn,"\n"; > > #my @attrs = sort $entr->attributes; > > > > my $attr; > > foreach $attr ( sort $entr->attributes ){ > > #skip binary we can't handle > > next if ( $attr =~ /;binary$/ ); > > } > > > > #print "@attrs\n"; > > print "#-------------------------------\n"; > > } > > > > # > > # end of walk through method > > #------------ > > > > Results in: > > > > DN: cn=dmjst17,cn=Recipients,ou=UCIS,o=University of Pittsburgh > > MAPI-Recipient : ARRAY(0x1f0cfe4) > > cn : ARRAY(0x1f0cd98) > > distinguishedName : ARRAY(0x1f0cde0) > > givenName : ARRAY(0x1f0cf48) > > mail : ARRAY(0x1f0ce70) > > objectClass : ARRAY(0x1f0e8d4) > > otherMailbox : ARRAY(0x1f0cf00) > > rdn : ARRAY(0x1f0cd38) > > rfc822Mailbox : ARRAY(0x1f0ce28) > > sn : ARRAY(0x1f0d02c) > > textEncodedORaddress : ARRAY(0x1f0ceb8) > > uid : ARRAY(0x1f0cf9c) > > > > Is this most likely an ActivePerl problem? Is it a perl-ldap problem? > > > > Insight would be greatly appreciated. > > > > --Mark > > ----- > > Mark J. Weixel > > Information Technology Projects Manager > > University Center for International Studies > > University of Pittsburgh > > Pittsburgh, PA 15260 USA > > we...@pi... > > > > > > |
From: Jurgen B. <ju...@bo...> - 2000-09-08 06:03:33
|
So I wrote simple little program to change the dn of an entry (attached), and first it fails as follows: $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel Can't call method "modify" on an undefined value at /usr/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 200 This seems to be because I call $entry->update without any args, but the manual sez: CLIENT is only optional if the Net::LDAP::Entry object was created by a search on a directory server. In which case, if omitted, the update will be sent back to the same server. Well, whatever, maybe this doesn't hold for changed dn's so, I give it an explicit $entry->update($ldap). Now I get: $ perl rename.pl uid=jbotz,ou=people,o=eazel password \ uid=tuser,ou=people,o=eazel uid=tuser1,ou=people,o=eazel Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.005/Net/LDAP.pm line 313. This seems to be because Net::LDAP->modify doesn't know its change type. Adding an explicit $entry->changetype('modify') to my script gets me further, but shouldn't the fact that I changed the dn have tipped it off? Anyway, now my program runs all the way through and produces the following error: Error: LDAP_PROTOCOL_ERROR -- Unrecognized version number or incorrect PDU structure Right now I'm pretty clueless what this could mean. All I'm trying to do at the moment is change the RDN! (On a Netscape 4.11 server, and the OpenLDAP ldapmodrdn(1) program works fine.) - Jurgen |
From: Mark W. <mew...@un...> - 2000-09-07 21:44:06
|
Actually I just reread your code. the problem is that in .20, get always returns back an array context. you need to do print " $attr : ",@$entr->get($attr),"\n"; Mark On Thu, 7 Sep 2000, Mark Weixel wrote: > Greetings, > > I installed perl-ldap .20 today in order to experiment with > Net::LDAP::Control::Sort (turns out my server doesn't support > sorting...) Unfortunately, after doing this, the sample code that I had > copied from the Examples page stopped dereferencing the information in > the individual entry references. > > I'm doing this under Win32, using ActiveState Perl build 617. > ActivePerl's PPM only has perl-ldap .15, so I downloaded the > distribution at SourceForge and installed by hand using NMake. > > As a result, the following: > > use strict; > use Net::LDAP; > use vars qw($ldap $mesg $entry); > > > > $ldap = Net::LDAP->new('ucis-nt.ucis.pitt.edu:389') or die "$@"; > > $ldap->bind ; # an anonymous bind > > $mesg = $ldap->search ( # perform a search > base => "c=US", > scope => 'sub', > filter => "(|(objectClass=organizationalPerson))" > ); > > $mesg->code && die $mesg->error; > #print $mesg->control; > #my @entries = $mesg->entries; > > > #------------ > # > # handle each of the results independently > # ... i.e. using the walk through method > # > my @entries = $mesg->entries; > > my $entr ; > foreach $entr ( @entries ) > { > print "DN: ",$entr->dn,"\n"; > #my @attrs = sort $entr->attributes; > > my $attr; > foreach $attr ( sort $entr->attributes ){ > #skip binary we can't handle > next if ( $attr =~ /;binary$/ ); > } > > #print "@attrs\n"; > print "#-------------------------------\n"; > } > > # > # end of walk through method > #------------ > > Results in: > > DN: cn=dmjst17,cn=Recipients,ou=UCIS,o=University of Pittsburgh > MAPI-Recipient : ARRAY(0x1f0cfe4) > cn : ARRAY(0x1f0cd98) > distinguishedName : ARRAY(0x1f0cde0) > givenName : ARRAY(0x1f0cf48) > mail : ARRAY(0x1f0ce70) > objectClass : ARRAY(0x1f0e8d4) > otherMailbox : ARRAY(0x1f0cf00) > rdn : ARRAY(0x1f0cd38) > rfc822Mailbox : ARRAY(0x1f0ce28) > sn : ARRAY(0x1f0d02c) > textEncodedORaddress : ARRAY(0x1f0ceb8) > uid : ARRAY(0x1f0cf9c) > > Is this most likely an ActivePerl problem? Is it a perl-ldap problem? > > Insight would be greatly appreciated. > > --Mark > ----- > Mark J. Weixel > Information Technology Projects Manager > University Center for International Studies > University of Pittsburgh > Pittsburgh, PA 15260 USA > we...@pi... > > |
From: Mark W. <mew...@un...> - 2000-09-07 21:42:39
|
Is the version of ActiveState Perl 5.6? If so, you need to upgrade to Perl 5.005 :) because 5.6 has some bugs in it that Net::LDAP tickles. Mark On Thu, 7 Sep 2000, Mark Weixel wrote: > Greetings, > > I installed perl-ldap .20 today in order to experiment with > Net::LDAP::Control::Sort (turns out my server doesn't support > sorting...) Unfortunately, after doing this, the sample code that I had > copied from the Examples page stopped dereferencing the information in > the individual entry references. > > I'm doing this under Win32, using ActiveState Perl build 617. > ActivePerl's PPM only has perl-ldap .15, so I downloaded the > distribution at SourceForge and installed by hand using NMake. > > As a result, the following: > > use strict; > use Net::LDAP; > use vars qw($ldap $mesg $entry); > > > > $ldap = Net::LDAP->new('ucis-nt.ucis.pitt.edu:389') or die "$@"; > > $ldap->bind ; # an anonymous bind > > $mesg = $ldap->search ( # perform a search > base => "c=US", > scope => 'sub', > filter => "(|(objectClass=organizationalPerson))" > ); > > $mesg->code && die $mesg->error; > #print $mesg->control; > #my @entries = $mesg->entries; > > > #------------ > # > # handle each of the results independently > # ... i.e. using the walk through method > # > my @entries = $mesg->entries; > > my $entr ; > foreach $entr ( @entries ) > { > print "DN: ",$entr->dn,"\n"; > #my @attrs = sort $entr->attributes; > > my $attr; > foreach $attr ( sort $entr->attributes ){ > #skip binary we can't handle > next if ( $attr =~ /;binary$/ ); > print " $attr : ",$entr->get($attr),"\n"; > } > > #print "@attrs\n"; > print "#-------------------------------\n"; > } > > # > # end of walk through method > #------------ > > Results in: > > DN: cn=dmjst17,cn=Recipients,ou=UCIS,o=University of Pittsburgh > MAPI-Recipient : ARRAY(0x1f0cfe4) > cn : ARRAY(0x1f0cd98) > distinguishedName : ARRAY(0x1f0cde0) > givenName : ARRAY(0x1f0cf48) > mail : ARRAY(0x1f0ce70) > objectClass : ARRAY(0x1f0e8d4) > otherMailbox : ARRAY(0x1f0cf00) > rdn : ARRAY(0x1f0cd38) > rfc822Mailbox : ARRAY(0x1f0ce28) > sn : ARRAY(0x1f0d02c) > textEncodedORaddress : ARRAY(0x1f0ceb8) > uid : ARRAY(0x1f0cf9c) > > Is this most likely an ActivePerl problem? Is it a perl-ldap problem? > > Insight would be greatly appreciated. > > --Mark > ----- > Mark J. Weixel > Information Technology Projects Manager > University Center for International Studies > University of Pittsburgh > Pittsburgh, PA 15260 USA > we...@pi... > > |
From: Mark W. <we...@pi...> - 2000-09-07 20:56:56
|
Greetings, I installed perl-ldap .20 today in order to experiment with Net::LDAP::Control::Sort (turns out my server doesn't support sorting...) Unfortunately, after doing this, the sample code that I had copied from the Examples page stopped dereferencing the information in the individual entry references. I'm doing this under Win32, using ActiveState Perl build 617. ActivePerl's PPM only has perl-ldap .15, so I downloaded the distribution at SourceForge and installed by hand using NMake. As a result, the following: use strict; use Net::LDAP; use vars qw($ldap $mesg $entry); $ldap = Net::LDAP->new('ucis-nt.ucis.pitt.edu:389') or die "$@"; $ldap->bind ; # an anonymous bind $mesg = $ldap->search ( # perform a search base => "c=US", scope => 'sub', filter => "(|(objectClass=organizationalPerson))" ); $mesg->code && die $mesg->error; #print $mesg->control; #my @entries = $mesg->entries; #------------ # # handle each of the results independently # ... i.e. using the walk through method # my @entries = $mesg->entries; my $entr ; foreach $entr ( @entries ) { print "DN: ",$entr->dn,"\n"; #my @attrs = sort $entr->attributes; my $attr; foreach $attr ( sort $entr->attributes ){ #skip binary we can't handle next if ( $attr =~ /;binary$/ ); print " $attr : ",$entr->get($attr),"\n"; } #print "@attrs\n"; print "#-------------------------------\n"; } # # end of walk through method #------------ Results in: DN: cn=dmjst17,cn=Recipients,ou=UCIS,o=University of Pittsburgh MAPI-Recipient : ARRAY(0x1f0cfe4) cn : ARRAY(0x1f0cd98) distinguishedName : ARRAY(0x1f0cde0) givenName : ARRAY(0x1f0cf48) mail : ARRAY(0x1f0ce70) objectClass : ARRAY(0x1f0e8d4) otherMailbox : ARRAY(0x1f0cf00) rdn : ARRAY(0x1f0cd38) rfc822Mailbox : ARRAY(0x1f0ce28) sn : ARRAY(0x1f0d02c) textEncodedORaddress : ARRAY(0x1f0ceb8) uid : ARRAY(0x1f0cf9c) Is this most likely an ActivePerl problem? Is it a perl-ldap problem? Insight would be greatly appreciated. --Mark ----- Mark J. Weixel Information Technology Projects Manager University Center for International Studies University of Pittsburgh Pittsburgh, PA 15260 USA we...@pi... |