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: Damon B. <da...@br...> - 2003-03-02 00:36:22
|
Hi, I'm just getting started with perl-ldap. I believe there is a problem with the lib/Net/LDAP.pod: --- lib/Net/LDAP.pod.orig Sat Mar 1 19:28:49 2003 +++ lib/Net/LDAP.pod @@ -31,7 +31,7 @@ Net::LDAP - Lightweight Directory Access $result = $ldap->add ( 'cn = Barbara Jensen, o=University of Michigan, c=us', attr => [ 'cn' => ['Barbara Jensen', 'Barbs Jensen'], - 'sn => 'Jensen', + 'sn' => 'Jensen', 'mail' => 'b.j...@um...', 'objectclass' => ['top', 'person', 'organizationalPerson', @@ -40,6 +40,7 @@ Net::LDAP - Lightweight Directory Access ); $result->code && warn "failed to add entry: ", $result->error ; + $ldap->unbind; # take down session =head1 DESCRIPTION The first modification is (I think) necessary, while the second change just makes me feel better. -- Damon Brodie <da...@br...> |
From: Jim H. <ha...@us...> - 2003-03-01 23:43:48
|
Hera is a sample, it will need to be customized to your university's specifics. You will need to know the directory server name, the attribute(s) used for the login ID and the baseDN. Your local administrators will nedd tos upply you with that information. --Jim Harle sub authenticate { my $ldap = = Net::LDAP->new('mydirectoryserver') or die "$@"; $ldap->bind ( version=>3) ; #first find dn for this login my $filter = "(|(uid=$login)(cn=$login))"; my $mesg = $ldap->search( base => $base, filter => $filter, attrs => ["dn"] ); return 0 if ($mesg->code || ($mesg->count() != 1)); my $entry = $mesg->entry(0); my $dn = $entry->dn; $mesg = $ldap->bind (dn => $dn, password => $password, version => 3) ; return $mesg->code; } harsh wrote: > Hi, > i m a student of an university where we use LDAP > based authentication for nearly everything. > i want to write a simple authentication application using > this module....which returns true if the user is authenticated > and false if he isn't.... > > > harsh > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf |
From: <MrT...@gm...> - 2003-03-01 21:55:55
|
Hi NG, first of all, i want to say Hello, cause this is my first mail to this group. My name is Thorsten and i'm new to LDAP and M$ ActiveDirectory. I set up an AD and try to write a perl script under Linux to connect/bind with username and password to my AD. This is my perl script: #!/usr/lib/perl #use Net::LDAP; use Net::LDAP qw(:all); use Net::LDAP::Util qw( ldap_error_name ldap_error_text) ; sub LDAPError { my ($from, $mesg) = @_; print STDERR "\n"; print STDERR "Return code: ", $mesg->code . "\n"; print STDERR "Message: ", ldap_error_name($mesg->code); print STDERR " : ", ldap_error_text($mesg->code); print STDERR "MessageID: ", $mesg->mesg_id . "\n"; print STDERR "DN: ", $mesg->dn; print STDERR "\n"; } sub LDAPConnect { my ($Server, $Account, $Password) = @_; $Password = ""; my $LDAP; $LDAP = Net::LDAP->new($Server) || die "Cannot connect to $Server\n"; my $mesg = $LDAP->bind(dn => $Account, password => $Password); print "Verbindung mit $Server als $Account\n"; LDAPError("Binding", $mesg) if $mesg->code(); return 0 if $mesg->code(); return $LDAP; } LDAPConnect("192.168.1.200","CN=Thorsten Müller,DC=test-domain,DC=de",""); #$ldap->unbind; When i start my script i receive the following: Return code: 48 Message: LDAP_INAPPROPRIATE_AUTH : The server requires the client which had attempted to bind anonymously or without supplying credentials to provide some form of credentials MessageID: 1 DN: Is it right, that the username for the connection is the DN of any user i created in my AD. I used M$'s Tool "ldifde" to receive the details (including the dn). My user has no password set. I don't know where to search for the failure. Hopefully someone can help. Thanks & Regards Thorsten |
From: Peter M. <pet...@ma...> - 2003-03-01 20:09:03
|
Hi, On Saturday 01 March 2003 20:30, Hirmke Michael wrote: > > It isn't in the docs any more. (At least in mine.) > > Please make sure you are looking at the correct man pages. > I looked into the docs on the CPAN web page, which belong to the latest > version of Perl::LDAP. When I look at=20 http://search.cpan.org/author/GBARR/perl-ldap-0.2701/lib/Net/LDAP/Schema.= pod I see the methods I described among others. > > all_attributes() and all_objectclasses() should give you all the name= s > > of attributes and objectclasses. > Yes, thats true, but they don't accept any parameters. > attributes( <objectClass> ) used to return all the attributes for this > objectClass, which doesn't seem to be possible any longer. Instead of using the plural try the singular (method names and arguments taken from the URL above): attribute NAME_OR_OID objectclass NAME_OR_OID Yours PEter --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@ad... D-97072 W=FCrzburg | Tel: +49 931 14721 PGP: 0BB1 04A3 0FB0 E27F 8018 52BA A286 7B23 9C22 2C83 |
From: Hirmke M. <Mi...@Hi...> - 2003-03-01 19:30:51
|
Hi, [...] > > Same with method "objectclasses". Since it is still in the docs, I > > It isn't in the docs any more. (At least in mine.) > Please make sure you are looking at the correct man pages. I looked into the docs on the CPAN web page, which belong to the latest version of Perl::LDAP. > > > supposed there were no changes, but ... > > Is there a replacement for these methods? > > all_attributes() and all_objectclasses() should give you all the names > of attributes and objectclasses. Yes, thats true, but they don't accept any parameters. attributes( <objectClass> ) used to return all the attributes for this objectClass, which doesn't seem to be possible any longer. > > Yours > Peter Bye. Michael. |
From: Peter M. <pet...@ma...> - 2003-03-01 19:20:03
|
Hi, On Friday 28 February 2003 10:42, Hirmke Michael wrote: > I often use code similar to the one in LDAP.pod: > > my $schema =3D $ldap->schema(); > # get objectClasses > @ocs =3D $schema->objectclasses(); > # Get the attributes > @atts =3D $schema->attributes(); > > This used to work as expected in vesion 0.25 - but stopped working > in 0.2701. I always get > > Can't locate object method "attributes" via package "Net::LDAP::Schema" > > Same with method "objectclasses". Since it is still in the docs, I It isn't in the docs any more. (At least in mine.) Please make sure you are looking at the correct man pages. > supposed there were no changes, but ... > Is there a replacement for these methods? all_attributes() and all_objectclasses() should give you all the names of attributes and objectclasses. Yours Peter --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@ad... D-97072 W=FCrzburg | Tel: +49 931 14721 PGP: 0BB1 04A3 0FB0 E27F 8018 52BA A286 7B23 9C22 2C83 |
From: Asian L. M. C. <mb...@bo...> - 2003-03-01 19:11:56
|
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 9"> <meta name=Originator content="Microsoft Word 9"> <link rel=File-List href="./如果您有兴趣在国 内开办美国教育部认 可的工商管理学士 _files/filelist.xml"> <title> 如果您有兴趣在国内 开办美国教育部认可 的工商管理学士(BBA) 、工商管理硕 士(MBA)课程、公共行政 管理(MPA)等课程,欢 迎电邮贵校简介致 </title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Jean&Adrian</o:Author> <o:LastAuthor>Jean&Adrian</o:LastAuthor> <o:Revision>2</o:Revision> <o:TotalTime>3</o:TotalTime> <o:Created>2003-03-01T14:16:00Z</o:Created> <o:LastSaved>2003-03-01T14:16:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Company>Home</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:Version>9.3821</o:Version> </o:DocumentProperties> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"MS Song"; mso-font-charset:134; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:1 135135232 16 0 262144 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:553679495 -2147483648 8 0 66047 0;} @font-face {font-family:"\@SimSun"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:134; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:1 135135232 16 0 262144 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> </head> <body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'> <div class=Section1> <p class=MsoNormal><b><span lang=ZH-CN style='font-family:SimSun;mso-ascii-font-family: "Times New Roman";mso-fareast-language:ZH-CN'> 如果您有兴趣在国内 开办美国教育部认可 的工商管理学士(</span></b> <b><span style='mso-fareast-font-family:SimSun;mso-fareast-language:ZH-CN'> BBA</span></b><b><span lang=ZH-CN style='font-family:SimSun;mso-ascii-font-family:"Times New Roman"; mso-fareast-language:ZH-CN'> )、工商管理硕士</span></b> <b><span style='mso-fareast-font-family:SimSun;mso-fareast-language:ZH-CN'> (MBA)</span></b><b><span lang=ZH-CN style='font-family:SimSun;mso-ascii-font-family:"Times New Roman"; mso-fareast-language:ZH-CN'> 课程、公共行政管理 (</span></b><b><span style='mso-fareast-font-family:SimSun;mso-fareast-language:ZH-CN'> MPA</span></b><b><span lang=ZH-CN style='font-family:SimSun;mso-ascii-font-family:"Times New Roman"; mso-fareast-language:ZH-CN'> )等课程,欢迎电邮 贵校简介致</span></b><b><span lang=ZH-CN style='mso-fareast-font-family:SimSun;mso-fareast-language:ZH-CN'> </span></b><b><span style='mso-fareast-font-family:SimSun;mso-fareast-language:ZH-CN'><a href="mailto:mb...@bo..."><span style='font-family:Tahoma'>mb...@bo...</span></a> <o:p></o:p></span></b></p> <p class=MsoNormal><b><span style='mso-fareast-font-family:SimSun;mso-fareast-language: ZH-CN'> <o:p></o:p></span></b></p> <p class=MsoNormal style='mso-layout-grid-align:none'><span style='font-size: 11.0pt;mso-bidi-font-size:10.0pt;font-family:SimSun; mso-ascii-font-family:Tahoma; mso-hansi-font-family:Tahoma;mso-bidi-font-family:Tahoma'> 如果有打扰到您的地 方,我在此向您道歉 !</span><span style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:Tahoma; mso-fareast-font-family:SimSun'><o:p></o:p></span></p> <p class=MsoNormal><span style='font-family:Tahoma;mso-fareast-language:ZH-CN'> <o:p></o:p> </span></p> <p class=MsoNormal>If youre keen to conduct accredited American Bachelor of Business, Master of Business Administration and Master of Public Administration programs, please drop an e-mail to <a href="mailto:mb...@bo...">mb...@bo...</a>, with your companys brief profile. </p> <p class=MsoNormal> </p> <p class=MsoNormal> </p> <p class=MsoNormal> </p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </div> </body> </html> |
From: Roland B. <rol...@ff...> - 2003-03-01 16:13:31
|
Hi, I have just subscribed to the list so maybe these are known issues ... 1) On my Windows XP the shell script install-nomake cannot be executed because of the #!/bin/sh However, the Perl part of the script does the job. I've called it install-nomake.pl (see the "patch" below). Is there really a need for a shell script or could install-nomake be just a Perl script? 2) When trying to use make (which is "nmake.exe" on Windows) I get the error message below. So install-nomake is helpful although I have a "make" ;-) Regards Roland #---------------- Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. NMAKE : fatal error U1095: expanded command line '@ C:\Perl\bin\perl.exe -MExtUtils::Install -e "pm_to_blib({@ARGV}, 'blib\lib\auto' , '')" lib/Net/LDAP/Extension/SetPassword.pm blib\lib\Net\LDAP\Extension\SetPassword.pm lib/Net/LDAP/Entry.pod blib\lib\Net\LDAP\En try.pod lib/Net/LDAP/Control/Sort.pm blib\lib\Net\LDAP\Control\Sort.pm lib/Bundle/Net/LDAP.pm blib\lib\Bundle\Net\LDAP.pm lib/Net /LDAP/Filter.pm blib\lib\Net\LDAP\Filter.pm lib/Net/LDAP.pm blib\lib\Net\LDAP.pm lib/Net/LDAP/Search.pod blib\lib\Net\LDAP\Search. pod lib/Net/LDAP/Control/SortResult.pm blib\lib\Net\LDAP\Control\SortResult.pm lib/Net/LDAP/LDIF.pod blib\lib\Net\LDAP\LDIF.pod l ib/Net/LDAP/Schema.pod blib\lib\Net\LDAP\Schema.pod lib/Net/LDAP/Entry.pm blib\lib\Net\LDAP\Entry.pm lib/Net/LDAPS.pm blib\lib\Net \LDAPS.pm lib/Net/LDAP/Bind.pm blib\lib\Net\LDAP\Bind.pm lib/LWP/Protocol/ldap.pm blib\lib\LWP\Protocol\ldap.pm lib/Net/LDAP/Sche ma.pm blib\lib\Net\LDAP\Schema.pm lib/Net/LDAP.pod blib\lib\Net\LDAP.pod lib/Net/LDAP/DSML.pm blib\lib\Net\LDAP\DSML.pm lib/Net/L DAP/Control/ProxyAuth.pm blib\lib\Net\LDAP\Control\ProxyAuth.pm lib/Net/LDAP/Reference.pod blib\lib\Net\LDAP\Reference.pod install -nomake.pl blib\lib\install-nomake.pl lib/Net/LDAP/Control/VLVResponse.pm blib\lib\Net\LDAP\Control\VLVResponse.pm lib/Net/LDAP/Ut il.pm blib\lib\Net\LDAP\Util.pm lib/Net/LDAP/ASN.pm blib\lib\Net\LDAP\ASN.pm lib/Net/LDAP/LDIF.pm blib\lib\Net\LDAP\LDIF.pm lib/N et/LDAP/Filter.pod blib\lib\Net\LDAP\Filter.pod lib/Net/LDAP/Examples.pod blib\lib\Net\LDAP\Examples.pod lib/Net/LDAP/Constant.pm blib\lib\Net\LDAP\Constant.pm lib/Net/LDAP/Search.pm blib\lib\Net\LDAP\Search.pm lib/Net/LDAP/Control/VLV.pm blib\lib\Net\LDAP\Con trol\VLV.pm lib/Net/LDAP/Extension.pm blib\lib\Net\LDAP\Extension.pm lib/Net/LDAP/FAQ.pod blib\lib\Net\LDAP\FAQ.pod lib/Net/LDAP/ Extra.pm blib\lib\Net\LDAP\Extra.pm lib/Net/LDAP/Control.pm blib\lib\Net\LDAP\Control.pm lib/Net/LDAP/Message.pm blib\lib\Net\LDAP \Message.pm lib/Net/LDAP/Control/Paged.pm blib\lib\Net\LDAP\Control\Paged.pm lib/Net/LDAP/Security.pod blib\lib\Net\LDAP\Security. pod lib/Net/LDAP/Message.pod blib\lib\Net\LDAP\Message.pod lib/Net/LDAP/Constant.pod blib\lib\Net\LDAP\Constant.pod lib/Net/LDAP/ RFC.pod blib\lib\Net\LDAP\RFC.pod' too long Stop. #---------------- #-------------------------------------------- --- install-nomake Fri May 04 17:06:40 2001 +++ install-nomake.pl Sat Mar 01 14:10:07 2003 @@ -1,4 +1,4 @@ -#!/bin/sh +#!perl # # This script is included in this distribution for the benefit # of those users who cannot use MakeMaker and make to install. @@ -10,8 +10,8 @@ # (This directory must already exist) # -eval 'exec perl -x -S $0 ${1+"$@"}' - if $running_under_some_shell; +#eval 'exec perl -x -S $0 ${1+"$@"}' +# if $running_under_some_shell; #! -*- perl -*- #-------------------------------------------- -- Roland Bauer http://www.fff.at/contact/ |
From: Christopher A B. <ca...@tc...> - 2003-03-01 09:00:54
|
As harsh once put it so eloquently: > The Following codes perform well > > use Net::LDAP qw(:all); > > $ldap=Net::LDAP->new("ldap2.iitb.ac.in"); > > $roll="02005008"; > $r=$ldap->search( > base => 'dc=iitb,dc=ac,dc=in', > filter => '(employeenumber=02005008)', > ); > > print $_->dn foreach($r->entries); > > but after replacing > filter => '(employeenumber=$roll)' > > no results > any clues why?? In perl, single quoted strings don't interpolate variables. Instead, try: filter => "(employeenumber=$roll)" %% Christopher A. Bongaarts %% ca...@tc... %% %% Internet Services %% http://umn.edu/~cab %% %% University of Minnesota %% +1 (612) 625-1809 %% |
From: harsh <ha...@cs...> - 2003-03-01 01:49:44
|
The Following codes perform well use Net::LDAP qw(:all); $ldap=Net::LDAP->new("ldap2.iitb.ac.in"); $roll="02005008"; $r=$ldap->search( base => 'dc=iitb,dc=ac,dc=in', filter => '(employeenumber=02005008)', ); print $_->dn foreach($r->entries); but after replacing filter => '(employeenumber=$roll)' no results any clues why?? |
From: harsh <ha...@cs...> - 2003-02-28 23:12:55
|
Hi, i m a student of an university where we use LDAP based authentication for nearly everything. i want to write a simple authentication application using this module....which returns true if the user is authenticated and false if he isn't.... harsh |
From: Chris R. <chr...@ma...> - 2003-02-28 11:36:15
|
On 28/2/03 11:08 am, Graham Barr <gb...@po...> wrote: > On Fri, Feb 28, 2003 at 10:20:27AM +0000, Chris Ridd wrote: >> On 28/2/03 9:46 am, Terje Tessem <ter...@gr...> wrote: >> >>> Thanks guys. >>> >>> "1.1" worked. Didn't quite understand how/why "1.1" describes "no >>> attributes", it was not described on >>> "http://search.cpan.org/author/GBARR/perl-ldap-0.2701/lib/Net/LDAP.pod". >> >> It would be useful to describe in LDAP.pod. It is actually defined in RFC >> 2251 as the way to request no attributes. > > I am very short on time right now, but patches welcome. > > Graham. > Patch attached. Cheers, Chris |
From: Graham B. <gb...@po...> - 2003-02-28 11:09:23
|
On Fri, Feb 28, 2003 at 10:20:27AM +0000, Chris Ridd wrote: > On 28/2/03 9:46 am, Terje Tessem <ter...@gr...> wrote: > > > Thanks guys. > > > > "1.1" worked. Didn't quite understand how/why "1.1" describes "no > > attributes", it was not described on > > "http://search.cpan.org/author/GBARR/perl-ldap-0.2701/lib/Net/LDAP.pod". > > It would be useful to describe in LDAP.pod. It is actually defined in RFC > 2251 as the way to request no attributes. I am very short on time right now, but patches welcome. Graham. |
From: Chris R. <chr...@ma...> - 2003-02-28 10:20:36
|
On 28/2/03 9:46 am, Terje Tessem <ter...@gr...> wrote: > Thanks guys. > > "1.1" worked. Didn't quite understand how/why "1.1" describes "no > attributes", it was not described on > "http://search.cpan.org/author/GBARR/perl-ldap-0.2701/lib/Net/LDAP.pod". It would be useful to describe in LDAP.pod. It is actually defined in RFC 2251 as the way to request no attributes. > But... it worked :-) Cool :-) > Regards > -Terje Cheers, Chris |
From: Terje T. <ter...@gr...> - 2003-02-28 09:45:21
|
Thanks guys. "1.1" worked. Didn't quite understand how/why "1.1" describes "no attributes", it was not described on "http://search.cpan.org/author/GBARR/perl-ldap-0.2701/lib/Net/LDAP.pod". But... it worked :-) Regards -Terje Chris Ridd wrote: >On 28/2/03 8:38 am, Paul Connolly <Pau...@cp...> wrote: > > >>Try: >> >>use Net::LDAP; >> >>my $ldap = Net::LDAP->new('localhost', port => 389, version => 3); >>$result = $ldap->search(base => 'ou=People,dc=myorg,dc=net', filter => >>'(myobj=myval)', attrs => ['dn']); >> >> > >That will request an attribute called "dn" which is not present in any >standard object classes. (It is a very common misconception that an entry's >DN is held in an attribute of the entry itself!) > >It is probably more appropriate to request *no* attributes back, which is >done by saying: > > attrs => [ "1.1" ] > >That feature requires LDAPv3. The server will return one SearchResult per >entry, and each SearchResult will contain the entry's DN and no attributes. > >This is a more appropriate search because it will reduce the amount of >network traffic in cases where there really *are* dn attributes in the >results! (There is a standard attribute called "dn".) > > > >>print $_->dn, "\n" foreach($result->entries); >> >> > >That's correct :-) > >Cheers, > >Chris > > > -- Terje Tessem - Ter...@Gr... Senior Consultant - GravityRock.com - Stavanger, Norway Tel/Fax/Cell: (+47) 51528055 / 51526191 / 90690109 There are only 10 types of people in the world: Those who understand binary, and those who don't... |
From: Hirmke M. <Mi...@Hi...> - 2003-02-28 09:43:28
|
Hi, > Actually Exchange 5.5 creates a single thread process for the search. > If the search results is over say 10,000 Exchange will drive up the > memory on the search, run out of resources and the search will die. If > your not careful other Exchange services will shut down as a result. uhm, I don't see any ressource problem on the Exchange machine. In task manager cpu und ram usage does not increase significantly when starting my search. > I would suggest setting your limit to something reasonable (Say 100, NOT > zero) and use Net::LDAP::Control::Paged; set at 100 per page. This > trims the thread to 100 records and saves resources. I've > returned as many as 160,000 objects with this method. Tried that with 1000 hits per page. I used the example from the man page for Control::Paged. It seems to work somehow, but I get an error saying Can't call method "cookie" without a package or object reference Any idea what might cause that? It happens with 0.251 and with 0.2701. Is it a bug in the module or is it my fault? > > Eric Bye. Michael. |
From: Hirmke M. <Mi...@Hi...> - 2003-02-28 09:43:05
|
Hi again, [...] > (I suspect > > this is the idle disconnect time configured in Exchange). > > > my( $LDAPDBG ) = 0; > > What do you see if you set this to 15 ? with LDAP 0.251 I get the following output: ---------------------------< schnipp schnapp >-------------------------- new ok Net::LDAP=HASH(0x8490e1c) sending: 30 3A 02 01 01 60 35 02 01 03 04 23 63 6E 3D XX 0:...`5....#cn=X XX XX XX XX XX XX XX XX XX XX 2C 63 6E 3D XX XX XXXXXXXXXX,cn=XX XX XX XX XX XX XX 2C 63 6E 3D 41 64 6D 69 6E 80 XXXXXX,cn=Admin. 0B XX XX XX XX XX XX XX XX XX XX XX __ __ __ __ .XXXXXXXXXXX 0000 58: SEQUENCE { 0002 1: INTEGER = 1 0005 53: [APPLICATION 0] { 0007 1: INTEGER = 3 000A 35: STRING = 'cn=XXXXXXXXXXX,cn=XXXXXXXX,cn=Admin' 002F 11: [CONTEXT 0] 0031 : 45 78 63 68 61 6E 67 65 35 2E 35 __ __ __ __ __ XXXXXXXXXXX 003C : } 003C : } Net::LDAP=HASH(0x8490e1c) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ 0000 12: SEQUENCE { 0002 1: INTEGER = 1 0005 7: [APPLICATION 1] { 0007 1: ENUM = 0 000A 0: STRING = '' 000C 0: STRING = '' 000E : } 000E : } bind ok Net::LDAP=HASH(0x8490e1c) sending: 30 81 9A 02 01 02 63 81 94 04 1B 6F 3D XX XX XX 0.....c....o=XXX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX XX XX XX XX XX XX 0A 01 02 0A 01 02 02 01 00 02 XXXXXX.......... 01 00 01 01 00 A3 23 04 0B 6F 62 6A 65 63 74 43 ......#..objectC 6C 61 73 73 04 14 6F 72 67 61 6E 69 7A 61 74 69 lass..organizati 6F 6E 61 6C 50 65 72 73 6F 6E 30 41 04 0D 72 66 onalPerson0A..rf 63 38 32 32 4D 61 69 6C 62 6F 78 04 0C 6F 74 68 c822Mailbox..oth 65 72 4D 61 69 6C 62 6F 78 04 16 48 69 64 65 2D erMailbox..Hide- 46 72 6F 6D 2D 41 64 64 72 65 73 73 2D 42 6F 6F From-Address-Boo 6B 04 0A 49 73 2D 44 65 6C 65 74 65 64 __ __ __ k..Is-Deleted 0000 154: SEQUENCE { 0003 1: INTEGER = 2 0006 148: [APPLICATION 3] { 0009 27: STRING = 'o=XXXXXXXXXXXXXXXXXXXXXXXXX' 0026 1: ENUM = 2 0029 1: ENUM = 2 002C 1: INTEGER = 0 002F 1: INTEGER = 0 0032 1: BOOLEAN = FALSE 0035 35: [CONTEXT 3] { 0037 11: STRING = 'objectClass' 0044 20: STRING = 'organizationalPerson' 005A : } 005A 65: SEQUENCE { 005C 13: STRING = 'rfc822Mailbox' 006B 12: STRING = 'otherMailbox' 0079 22: STRING = 'Hide-From-Address-Book' 0091 10: STRING = 'Is-Deleted' 009D : } 009D : } 009D : } search ok hits: 0 Net::LDAP=HASH(0x8490e1c) sending: 30 05 02 01 03 42 00 __ __ __ __ __ __ __ __ __ 0....B. 0000 5: SEQUENCE { 0002 1: INTEGER = 3 0005 0: [APPLICATION 2] 0007 : } ---------------------------< schnipp schnapp >-------------------------- > > Graham. > Bye. Michael. |
From: Hirmke M. <Mi...@Hi...> - 2003-02-28 09:42:14
|
Hi, [...] > (I suspect > > this is the idle disconnect time configured in Exchange). > > > my( $LDAPDBG ) = 0; > > What do you see if you set this to 15 ? before solving my original problem, I first have to find a solution for this one: I often use code similar to the one in LDAP.pod: my $schema = $ldap->schema(); # get objectClasses @ocs = $schema->objectclasses(); # Get the attributes @atts = $schema->attributes(); This used to work as expected in vesion 0.25 - but stopped working in 0.2701. I always get Can't locate object method "attributes" via package "Net::LDAP::Schema" Same with method "objectclasses". Since it is still in the docs, I supposed there were no changes, but ... Is there a replacement for these methods? > > Graham. > TIA. Bye. Michael. |
From: Chris R. <chr...@ma...> - 2003-02-28 09:32:16
|
On 28/2/03 8:38 am, Paul Connolly <Pau...@cp...> wrote: > Try: > > use Net::LDAP; > > my $ldap = Net::LDAP->new('localhost', port => 389, version => 3); > $result = $ldap->search(base => 'ou=People,dc=myorg,dc=net', filter => > '(myobj=myval)', attrs => ['dn']); That will request an attribute called "dn" which is not present in any standard object classes. (It is a very common misconception that an entry's DN is held in an attribute of the entry itself!) It is probably more appropriate to request *no* attributes back, which is done by saying: attrs => [ "1.1" ] That feature requires LDAPv3. The server will return one SearchResult per entry, and each SearchResult will contain the entry's DN and no attributes. This is a more appropriate search because it will reduce the amount of network traffic in cases where there really *are* dn attributes in the results! (There is a standard attribute called "dn".) > print $_->dn, "\n" foreach($result->entries); That's correct :-) Cheers, Chris |
From: Paul C. <Pau...@cp...> - 2003-02-28 08:38:45
|
Try: use Net::LDAP; my $ldap = Net::LDAP->new('localhost', port => 389, version => 3); $result = $ldap->search(base => 'ou=People,dc=myorg,dc=net', filter => '(myobj=myval)', attrs => ['dn']); print $_->dn, "\n" foreach($result->entries); -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of Terje Tessem Sent: 28 February 2003 08:08 To: per...@li... Subject: Search Hi. Using the Perl Net::LDAP search routine, I am wondering if it is possible to retrieve the full DN of a object, not just the object-attributes. Example: on commandline using "ldapsearch", I can do the following search which gives me some results: Search: ldapsearch -h localhost -p 389 -b "ou=People,dc=myorg,dc=net" myobj=myval Result 1: (1) myobj=myval,uid=foo,ou=People,dc=myorg,dc=net (2) myobj=myval (3) objectClass=top (4) objectClass=myobj Search 2: ldapsearch -h localhost -p 389 -b "ou=People,dc=myorg,dc=net" myobj=myval DN Result: (5) myobj=myval,uid=foo,ou=People,dc=myorg,dc=net However, as far as I have understood the Net::LDAP module, I can only get the result as single attributes (like (2),(3) and (4) indicates). But what I wants is the result with full DN in a form like (1) and (5) indicates. If this can be done, can anybody give me a example on how this can be done with Net::LDAP ? (The reason for wanting this is that the resulting object is deep down in the LDAP three structure, compared to the searchbase.) Thanks in advance -Terje ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
From: Terje T. <ter...@gr...> - 2003-02-28 08:07:52
|
Hi. Using the Perl Net::LDAP search routine, I am wondering if it is possible to retrieve the full DN of a object, not just the object-attributes. Example: on commandline using "ldapsearch", I can do the following search which gives me some results: Search: ldapsearch -h localhost -p 389 -b "ou=People,dc=myorg,dc=net" myobj=myval Result 1: (1) myobj=myval,uid=foo,ou=People,dc=myorg,dc=net (2) myobj=myval (3) objectClass=top (4) objectClass=myobj Search 2: ldapsearch -h localhost -p 389 -b "ou=People,dc=myorg,dc=net" myobj=myval DN Result: (5) myobj=myval,uid=foo,ou=People,dc=myorg,dc=net However, as far as I have understood the Net::LDAP module, I can only get the result as single attributes (like (2),(3) and (4) indicates). But what I wants is the result with full DN in a form like (1) and (5) indicates. If this can be done, can anybody give me a example on how this can be done with Net::LDAP ? (The reason for wanting this is that the resulting object is deep down in the LDAP three structure, compared to the searchbase.) Thanks in advance -Terje |
From: P. T. S. <tak...@sa...> - 2003-02-27 16:31:43
|
Hi, I am using Perl 5.8 on Solaris 2.9. I have confirmed that the variables do contain the correct values (I've printed them out, and I have compared them to what I want them to contain). Still, they don't work. Thanks for the suggestions. Sta...@GI... wrote: > > > > Takis, > > I have no problem doing exactly what you are doing with almost the same > exact syntax using scalers and hashes. I've never had a problem, make > sure none of you variables are empty (i.e. use logging or debugging to > determine for sure all the variables contain what you want before the > search) > > Also what version of perl are using and on what platform? > > -Stan > |
From: <Sta...@GI...> - 2003-02-27 16:24:47
|
Takis, I have no problem doing exactly what you are doing with almost the same exact syntax using scalers and hashes. I've never had a problem, make sure none of you variables are empty (i.e. use logging or debugging to determine for sure all the variables contain what you want before the search) Also what version of perl are using and on what platform? -Stan Takis Skagos <tak...@sa...> To: LDAP Mailing List <per...@li...> Sent by: cc: per...@li...ur Subject: Re: [Fwd] LDAP::NEW question ceforge.net 02/26/2003 03:14 PM Hi, I was doing a bit more research on this, and I can actually get the query to work if I hard-code my values into the search command. However, if I use variables ... the search fails. Here is the line with and without hard-coding: Hardcoded: my $search = $ldap->search(base => "o=qlo", scope => "sub", filter => "(&(|(givenname=*takis*)(uid=*skagos*))(objectclass=inetOrgPerson))") Not Hardcoded: my $search = $ldap->search(base => "$basedn", scope => "$config{searchscope}", filter => "$filter") I've checked the values of those variables, and they are correct. I've also tried using them with and without quotes. I'm really stumped. Any information/assistance would be appreciated. Thanks. -- Takis -- |o| P. Takis Skagos SaskTel - MIS |o| |o| w: 306.777.4671 e-mail: tak...@sa... |o| |o|-----------------------------------------------------------------|o| |o| Two wrongs don't make a right, but three rights do make a left. |o| ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp |
From: <Sta...@GI...> - 2003-02-27 16:23:59
|
Eric, Please re-read my message, I'm not using notes for LDAP just e-mail ;-) I'm using iPlanet, any help I could get ASAP would be great... -Stan Eric Nichols <eri...@di...> To: Sta...@GI... Sent by: cc: per...@li..., per...@li... per...@li...ur Subject: Re: Problems with groups... ceforge.net 02/26/2003 04:55 PM Lotus Notes it truely a let down when it comes to LDAP. I think you'll find that any complicated searches you send Notes will results in errors. Sta...@GI... wrote: > > >Hey, > >Sorry about my last message being wrpapped so badly, Notes is a pain. To >clarify, >I am am trying to retrieve the names of all the groups on the LDAP server >with the >objectClasses I specified below. But one of my groups does not show up in >searches. > >I am able to get the name of the group by doing the following: > >$mesg = $ldap->search(base => "$rconfig{'branchdn'}", > scope => 'sub', > filter => >"(|(member=$userDN)(objectclass=groupOfNames))", > attrs => ['cn','dn']); > >but doing anything like this: > >$mesg = $ldap->search(base => "$rconfig{'branchdn'}", > scope => 'sub', > filter => "(&(cn=*)(objectclass=groupOfNames))", > attrs => ['cn']); > >While case #1 works fine, I cannot use it since it is in a block of code >which >does not deal with users therefore looking for an arbitrary in the group to >locate it is not a feasible option. The latter always returns 0 results >causing >my error code to kick in and end the script as intended. Graham do you >have any idea about why this would fail to work, or what some workarounds >might be besides the one I mentioned above? > >Best Regards, > >Stan > > > > > Sta...@GI... > Sent by: To: per...@li... > per...@li...ur cc: > ceforge.net Subject: Problems with groups... > > > 02/26/2003 02:53 PM > > > > > > > > > > >Hey, > >I've been successfully using Net::LDAP for a while, but recently when >I started working with groups I began having a problem... > >When I'm searching for a group's info I usually have no problem >doing this: > > $mesg = $ldap->search(base => "$rconfig{'branchdn'}",scope => >'sub',filter => "(&(cn=*)(objectclass=groupOfUniqueNames))",attrs => >['cn']); > >And I loop through the results to get the names of all the groups whose >objectClass >is groupOfUniqueNames. This works just fine, but when i try this: > > $mesg = $ldap->search(base => "$rconfig{'branchdn'}",scope => >'sub',filter => "(&(cn=*)(objectclass=groupOfNames))",attrs => ['cn']); > >To get the groups whose objectClass is groupOfNames I get no results >returned. >The groups are in the same hierarchy as the other groups (same base) I was >able to search >out above, any idea why this returns 0 results even though doing it from >the command-line >using ldapsearch works? > >I'm able to modify the groups whos oC is groupOfNames, so I'm not sure why >this isn't working. Any help would be greatly appreciated! > >Best Regards, > >Stan > > > >------------------------------------------------------- >This SF.net email is sponsored by: Scholarships for Techies! >Can't afford IT training? All 2003 ictp students receive scholarships. >Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. >www.ictp.com/training/sourceforge.asp > > > > > >------------------------------------------------------- >This SF.net email is sponsored by: Scholarships for Techies! >Can't afford IT training? All 2003 ictp students receive scholarships. >Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. >www.ictp.com/training/sourceforge.asp > > ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp |
From: Jim H. <ha...@us...> - 2003-02-27 14:58:42
|
Try replacing the constants one at a time with variables. They should work with or without quotes. It is possible that one value in a variable is getting messed up. --Jim Harle On Wed, 26 Feb 2003, Takis Skagos wrote: > > Hi, > > I was doing a bit more research on this, and I can actually get the > query to work if I hard-code my values into the search command. > However, if I use variables ... the search fails. Here is the line with > and without hard-coding: > > Hardcoded: > my $search = $ldap->search(base => "o=qlo", scope => "sub", > filter => > "(&(|(givenname=*takis*)(uid=*skagos*))(objectclass=inetOrgPerson))") > > > Not Hardcoded: > my $search = $ldap->search(base => "$basedn", scope => > "$config{searchscope}", > filter => "$filter") > > I've checked the values of those variables, and they are correct. > I've also tried using them with and without quotes. I'm really stumped. > Any information/assistance would be appreciated. > > Thanks. > > -- > Takis > -- > |o| P. Takis Skagos SaskTel - MIS |o| > |o| w: 306.777.4671 e-mail: tak...@sa... |o| > |o|-----------------------------------------------------------------|o| > |o| Two wrongs don't make a right, but three rights do make a left. |o| > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > |