Re: LDAP search

2013-10-01 Thread Dieter Klünter
; > Any direction would be greatly appreciated. > > #!/usr/bin/perl > # > use Net::LDAP; > > my $lsvr = 'ldap.example.com'; > my $ldap = Net::LDAP->new($lsvr) > or die "error connecting to $lsvr: $@"; > > $ldap->bind; # Bind anony

Re: LDAP search

2013-10-01 Thread Justin Alcorn
On Tue, Oct 1, 2013 at 2:38 PM, Paul Fontenot wrote: > my $results = $ldap->search ( # Perform a > search for 'nvp' > filter => "(&(c=US))" > ); > my $results = $ldap->search (

Re: LDAP search

2013-10-01 Thread Chris Ridd
On 1 Oct 2013, at 22:16, Quanah Gibson-Mount wrote: > --On Tuesday, October 01, 2013 9:19 PM +0100 Chris Ridd > wrote: > >> >> On 1 Oct 2013, at 19:46, Clément OUDOT wrote: >> >>> You use a base in ldapsearch and a filter in your code. Use 'base' in >>> search() to set the search base. >>

Re: LDAP search

2013-10-01 Thread Quanah Gibson-Mount
ike: #!/usr/bin/perl use Net::LDAP; my $ldap = Net::LDAP->new('serverbits'); $ldap->bind; my $results=$ldap->search(base=>"", filter=>"(objectClass=*)"); foreach my $entry ($results->entries) { $entry->dump; } $ldap->unbind; Results

Re: LDAP search

2013-10-01 Thread Chris Ridd
On 1 Oct 2013, at 19:46, Clément OUDOT wrote: > You use a base in ldapsearch and a filter in your code. Use 'base' in > search() to set the search base. For Paul's benefit: what's happening here is that LDAP searches *require* that a search base is specified, a search scope is specified, and

Re: LDAP search

2013-10-01 Thread Clément OUDOT
ly appreciated. > > #!/usr/bin/perl > # > use Net::LDAP; > > my $lsvr = 'ldap.example.com'; > my $ldap = Net::LDAP->new($lsvr) > or die "error connecting to $lsvr: $@"; > > $ldap->bind; # Bind anonymously, that is, no login and pass > >

LDAP search

2013-10-01 Thread Paul Fontenot
my $ldap = Net::LDAP->new($lsvr) or die "error connecting to $lsvr: $@"; $ldap->bind; # Bind anonymously, that is, no login and pass my $results = $ldap->search ( # Perform a search for 'nvp' filter => "(&(

Re: Net::LDAP Search Filter

2013-04-26 Thread Chris Ridd
On 25 Apr 2013, at 15:03, "Zachary, Carlton - Hoboken" wrote: > Thanks David. > > -Original Message- > From: david.suarezde...@telefonica.es > [mailto:david.suarezde...@telefonica.es] > Sent: Thursday, April 25, 2013 9:35 AM > To: perl-ldap@perl.org

RE: Net::LDAP Search Filter

2013-04-25 Thread Zachary, Carlton - Hoboken
Thanks David. -Original Message- From: david.suarezde...@telefonica.es [mailto:david.suarezde...@telefonica.es] Sent: Thursday, April 25, 2013 9:35 AM To: perl-ldap@perl.org Subject: Re: Net::LDAP Search Filter Hi there, Carlton, The problem is that you are asking for employee types x

RE: Net::LDAP Search Filter

2013-04-25 Thread Zachary, Carlton - Hoboken
Thanks Graham. -Original Message- From: Graham Barr [mailto:gb...@pobox.com] Sent: Thursday, April 25, 2013 9:31 AM To: Zachary, Carlton - Hoboken Cc: perl-ldap@perl.org Subject: Re: Net::LDAP Search Filter On Apr 25, 2013, at 08:26 , "Zachary, Carlton - Hoboken" wrote: &

Re: Net::LDAP Search Filter

2013-04-25 Thread david . suarezdelis
en" Para: "perl-ldap@perl.org" Fecha: 25/04/2013 15:27 Asunto: Net::LDAP Search Filter Hello all, I am trying to run this search against my directory service with the following filter and it returns nothing. (&(employeetype=x)(employeetype=y)(objectclass=*)) But if I

Re: Net::LDAP Search Filter

2013-04-25 Thread Graham Barr
On Apr 25, 2013, at 08:26 , "Zachary, Carlton - Hoboken" wrote: > Hello all, > > I am trying to run this search against my directory service with the > following filter and it returns nothing. > > (&(employeetype=x)(employeetype=y)(objectclass=*)) that is checking (employeetype=x) and (emp

Net::LDAP Search Filter

2013-04-25 Thread Zachary, Carlton - Hoboken
Hello all, I am trying to run this search against my directory service with the following filter and it returns nothing. (&(employeetype=x)(employeetype=y)(objectclass=*)) But if I do just: (&(employeetype=x)(objectclass=*)) Or (&(employeetype=y)(objectclass=*)) I get search data returned.

Re: LDAP search

2012-09-13 Thread Quanah Gibson-Mount
--On Thursday, September 13, 2012 6:37 PM +0300 Pablo Calderon Diez wrote: my $mesg = $ldap->search(&("filter=>"contractCode=$values[0]", filter=>"OfferID=$values[2]"),base=>"ou=Offers,dc=du,dc=ae"); my $mesg = $ldap->search(base

LDAP search

2012-09-13 Thread Pablo Calderon Diez
Hi, I am really sorry for bother you but I have one issue with one LDAP search. This is the line that is not working: my $mesg = $ldap->search(filter=>"contractCode=$values[0]","&",filter=>"OfferID=$values [2]",base=>"ou=Offers,dc=du,d

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-27 Thread Clément OUDOT
2011/7/27 Peter Marschall : > Hi, > > On Wednesday, 20. July 2011, Graham Barr wrote: >> On Jul 20, 2011, at 07:32 , Francis Swasey wrote: >> > On Jul 20, 2011, at 8:26, Chris Ridd wrote: >> >> Graham, should _escape be made public? It seems like it would be useful. >> > Perhaps a flag on the new

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-27 Thread Peter Marschall
Hi, On Wednesday, 20. July 2011, Graham Barr wrote: > On Jul 20, 2011, at 07:32 , Francis Swasey wrote: > > On Jul 20, 2011, at 8:26, Chris Ridd wrote: > >> Graham, should _escape be made public? It seems like it would be useful. > > Perhaps a flag on the new call that indicates there are no esca

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-22 Thread Clément OUDOT
2011/7/20 Chris Ridd : > > On 20 Jul 2011, at 13:36, Graham Barr wrote: > >> >> On Jul 20, 2011, at 07:32 , Francis Swasey wrote: >> >>> >>> >>> On Jul 20, 2011, at 8:26, Chris Ridd wrote: >>> > > > Graham, should _escape be made public? It seems like it would be useful.

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Chris Ridd
On 20 Jul 2011, at 13:36, Graham Barr wrote: > > On Jul 20, 2011, at 07:32 , Francis Swasey wrote: > >> >> >> On Jul 20, 2011, at 8:26, Chris Ridd wrote: >> >>> >>> >>> Graham, should _escape be made public? It seems like it would be useful. Or >>> is manipulating the d

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Graham Barr
On Jul 20, 2011, at 07:32 , Francis Swasey wrote: > > > On Jul 20, 2011, at 8:26, Chris Ridd wrote: > >> >>> >>> >>> >> >> Graham, should _escape be made public? It seems like it would be useful. Or >> is manipulating the data structure returned from new the better approach? > > Perhap

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Francis Swasey
On Jul 20, 2011, at 8:26, Chris Ridd wrote: > >> >> >> > > Graham, should _escape be made public? It seems like it would be useful. Or > is manipulating the data structure returned from new the better approach? Perhaps a flag on the new call that indicates there are no escapes in the st

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Chris Ridd
l also escape the other characters that are special in LDAP search filter strings. eg: Net::LDAP::Filter::_escape("(cn=foo)") returns '\28cn=foo\29'. That is because "(" and ")" are special characters. So you can't usefully run it on the entire filter string

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Clément OUDOT
Le 20 juillet 2011 13:13, Chris Ridd a écrit : > > On 20 Jul 2011, at 11:34, Clément OUDOT wrote: > >> Hi, >> >> I will have a look to Net::LDAP::Filter, but I see in Net::LDAP that a >> new Net::LDAP::Filter is created in the search subroutine when filter >> is a string. Why do the Net::LDAP::Fil

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Chris Ridd
On 20 Jul 2011, at 11:34, Clément OUDOT wrote: > Hi, > > I will have a look to Net::LDAP::Filter, but I see in Net::LDAP that a > new Net::LDAP::Filter is created in the search subroutine when filter > is a string. Why do the Net::LDAP::Filter object do not escape the > special characters from t

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Clément OUDOT
I added this line : >> >> $searchFilter =~ s/\\//; >> >> >> My question: is this a bug in my code, or can this be a Perl-LDAP bug? >> I am using version 0.4001. > > I think it is a bug in your code :-( > > LDAP search filter strings consider cert

Re: Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Chris Ridd
ackslash ('\'). This is the case for example if the value > is a DN like this : cn=OUDOT\, Clement, ou=users, dc=example, dc=com > > To make this works, I added this line : > > $searchFilter =~ s/\\//; > > > My question: is this a bug in my code, or can this

Problem with LDAP search filter containing a backslash ('\')

2011-07-20 Thread Clément OUDOT
Hi, I have a piece of code where I build a search filter with some variables, like this: my $searchFilter = "(&(objectClass=" . $portal->{ldapGroupObjectClass} . ")(|"; foreach ( split( $portal->{multiValuesSeparator}, $value ) ) { $searchFilter .= "(" . $key . "=" . $_ . ")

Re: Net::LDAP search of a DN

2011-05-18 Thread Chris Ridd
On 18 May 2011, at 18:45, Brian Gaber wrote: > This dn search of dn=cn=name,o=org works from a command line and returns all > the attributes of the dn: > > ldapsearch -h host -x -b "cn=name,o=org" > > However, this Net::LDAP does not return anything: > > $m

Net::LDAP search of a DN

2011-05-18 Thread Brian Gaber
This dn search of dn=cn=name,o=org works from a command line and returns all the attributes of the dn: ldapsearch -h host -x -b "cn=name,o=org" However, this Net::LDAP does not return anything: $mesg = $ldap->search(base=>"cn=name,o=org"); I have also tri

RE: LDAP Search for all attributes of a DN

2011-03-08 Thread Brian Gaber
Thanks for your help. The dn begins with the form cn=lastname, firstname, ou=... I had the dn in double quotes. When I put the dn in single quotes and escaped the comma after the lastname then the search worked.

Re: LDAP Search for all attributes of a DN

2011-03-08 Thread Christopher Bongaarts
Brian Gaber wrote: Try using your second attempt but add a filter of "(objectClass=*)". I tried this and still do not get expected return $mesg = $ldap->search( base => $dn, scope => 'base', filter

RE: LDAP Search for all attributes of a DN

2011-03-08 Thread Brian Gaber
> Try using your second attempt but add a filter of "(objectClass=*)". I tried this and still do not get expected return $mesg = $ldap->search( base => $dn, scope => 'base', filter => '(objectC

Re: LDAP Search for all attributes of a DN

2011-03-05 Thread Dieter Kluenter
Am Fri, 4 Mar 2011 13:38:56 -0500 schrieb Brian Gaber : > I have tried these two Net::LDAP approaches, but $numEnt is zero in > both cases: > > $mesg = $ldap->search( base => $dn ); > $numEnt = $mesg->count; you should add a scope, IFAIK default is base, so scope o

Re: LDAP Search for all attributes of a DN

2011-03-05 Thread Christopher Bongaarts
Brian Gaber wrote: I have tried these two Net::LDAP approaches, but $numEnt is zero in both cases: $mesg = $ldap->search( base => $dn ); $numEnt = $mesg->count; $mesg = $ldap->search ( base => $dn, scope => 'base',); $numEnt = $mesg->count; A command lin

LDAP Search for all attributes of a DN

2011-03-04 Thread Brian Gaber
I have tried these two Net::LDAP approaches, but $numEnt is zero in both cases: $mesg = $ldap->search( base => $dn ); $numEnt = $mesg->count; $mesg = $ldap->search ( base => $dn, scope => 'base',); $numEnt = $mesg->count; A command line ldapsearch lik

Re: NET::LDAP Search Works, pop_entry problematic #2

2010-08-11 Thread rfransix
Hello Graham, Can you expand your helpful suggestions a bit. I've tried these without success. How can the code below be modified to make $entry->dn work? Thanks very much. $ldap->search(...) will return a Net::LDAP::Search object, not a DN as you seem to be expecti

Re: NET::LDAP Search Works, pop_entry problematic #2

2010-07-08 Thread rfransix
perl-ldap@perl.org Sent: Thursday, July 8, 2010 1:02:10 AM Subject: Re: NET::LDAP Search Works, pop_entry problematic #2 On 7 Jul 2010, at 22:47, rfran...@comcast.net wrote: > my $HOST = "1"; > my $ADMIN = "cn=me,DC=corp"; > my $PWD = "0"; > my $BAS

Re: NET::LDAP Search Works, pop_entry problematic #2

2010-07-07 Thread Chris Ridd
confusing. It actually returns an Net::LDAP::Message object, which you need to inspect to see if the bind succeeded. (Checking the code() value should suffice.) I'd rename the other objects you get back from $ldap->search() etc as well, as they're not DNs. None of the above suggestio

NET::LDAP Search Works, pop_entry problematic #2

2010-07-07 Thread rfransix
h MGR one line at a time, printing that result as the fourth line. Thanks for looking. #! perl use strict; use warnings; use diagnostics; use Net::LDAP; use Net::LDAP::Entry; use Net::LDAP::Search; use Net::LDAP::LDIF; open PERSON, "<", "ou3" or die "

NET::LDAP Search Works, pop_entry problematic #2

2010-07-07 Thread rfransix
d dn and $dn). Thanks for looking, again. #! perl use strict; use warnings; use diagnostics; use Net::LDAP; use Net::LDAP::Entry; use Net::LDAP::Search; use Net::LDAP::LDIF; open PERSON, "<", "ou3" or die "Cannot open 'ou3': $!"; open MGR, "

Re: NET::LDAP Search Works, pop_entry problematic #2

2010-07-01 Thread Graham Barr
$ldap->search(...) will return a Net::LDAP::Search object, not a DN as you seem to be expecting. You can tell this from the way in which perl string-ifies the object to "Net::LDAP::Search=HASH(0x1844ba4)" $entry = $dn->pop_entry; will given you the first entry in the result set

NET::LDAP Search Works, pop_entry problematic #2

2010-07-01 Thread rfransix
nt OUT "replace: manager", "\n"; } Causes this output...so is there is another method to decode the HASH? Net::LDAP::Search=HASH(0x1844ba4) changetype: modify replace: manager Net::LDAP::Search=HASH(0x1844ba4) changetype: modify replace: manager Net::LDAP::Search=HAS

NET::LDAP Search Works, pop_entry problematic

2010-06-29 Thread rfransix
::LDAP::LDIF::_write_entry('Net::LDAP::LDIF=HASH(0x18746cc)', 0, undef) called at c:/Perl/site/lib/Net/LDAP/LDIF.pm line 473     Net::LDAP::LDIF::write_entry('Net::LDAP::LDIF=HASH(0x18746cc)', undef) called at ldif3a.pl line 54 1 C:\Temp10>cat ldif3a.pl #! perl

RE: ldap search problem.

2010-02-10 Thread Andrew Meng
ydomain", password=>"password") or die 'Could not bind'; $ldap->bind("mydomain\id", password=>"password") or die 'Could not bind'; none is working. Thanks a lot, Andrew > From: john.shea...@priceline.com > To: m.

RE: ldap search problem.

2010-02-08 Thread Sheahan, John
"DC=bb" From: Andrew Meng [mailto:m...@hotmail.com] Sent: Monday, February 08, 2010 12:29 PM To: Sheahan, John; perl-ldap@perl.org Subject: RE: ldap search problem. John, It turns out to be a "user not found" error(error code 525). In ldp.exe, I need to specify the Windows

Re: ldap search problem.

2010-02-08 Thread Graham Barr
On Feb 5, 2010, at 1:02 PM, Andrew Meng wrote: > > Hello, > > > > LDAP search failed to return any result but I can get the result back using > the same base and filter in ldp.exe. Here is the code: > > > > !/usr/bin/perl > > > use Net::LDAP;

Re: ldap search problem.

2010-02-07 Thread aconverse
I keep getting your email traffic, can you delete me?? thanks, - Original Message - From: "Clément OUDOT" To: "Andrew Meng" Cc: perl-ldap@perl.org Sent: Sunday, February 7, 2010 9:57:18 AM GMT -05:00 US/Canada Eastern Subject: Re: ldap search p

Re: ldap search problem.

2010-02-07 Thread Clément OUDOT
> > Hello, > > > > LDAP search failed to return any result but I can get the result back > using the same base and filter in ldp.exe. Here is the code: > > > > !/usr/bin/perl > > > use Net::LDAP; > > > > $ldap = Net::LDAP->new(&quo

ldap search problem.

2010-02-06 Thread Andrew Meng
Hello, LDAP search failed to return any result but I can get the result back using the same base and filter in ldp.exe. Here is the code: !/usr/bin/perl use Net::LDAP; $ldap = Net::LDAP->new("server", port =>389) or die 'Could not contact LDAP server'; $

Net::LDAP: search(raw=>...) does not work

2009-01-31 Thread Gert Brinkmann
Hello, I just would like to report an issue that IMHO is a bug in Net::LDAP: To make sure that UTF-8 data is correctly tagged/converted to UTF-8 you have to use the raw-option in the constructor new() or the search() method. This indeed works if passing it to the constructor, but it does not wor

Net::LDAP::Search documentation for "entry"

2008-06-12 Thread Richard Burkert
Just wanted to point out that the documentation for entry(INDEX) makes it sound as if INDEX is one-based ("N'th entry" and especially "If INDEX is greater than the total number of entries", rather than "greater than or equal to"). This E-mail, including any attachments, may be intended solely f

RE: Ldap search does not return expected result

2007-12-06 Thread Brian Gaber
Don, Thanks, adding objectclass=* as a filter to my Net::LDAP search caused it to return results. Brian -Original Message- From: Don C. Miller [mailto:[EMAIL PROTECTED] Sent: Thursday, December 06, 2007 12:49 PM To: Brian Gaber; perl-ldap@perl.org Subject: RE: Ldap search does

RE: Ldap search does not return expected result

2007-12-06 Thread Brian Gaber
ay, December 06, 2007 12:37 PM To: Brian Gaber Cc: perl-ldap@perl.org Subject: Re: Ldap search does not return expected result On 6 Dec 2007, at 16:43, Brian G wrote: > I run this command and I get the expected result: > > ldapsearch -h 10.19.15.50 -x -b > ou=addresslist,ou=test,ou=

RE: Ldap search does not return expected result

2007-12-06 Thread Don C. Miller
:[EMAIL PROTECTED] Sent: Thursday, December 06, 2007 8:43 AM To: perl-ldap@perl.org Subject: Ldap search does not return expected result I run this command and I get the expected result: ldapsearch -h 10.19.15.50 -x -b ou=addresslist,ou=test,ou=cfmrs,ou=sftaccess,o=sft -s one dn I then try to

Re: Ldap search does not return expected result

2007-12-06 Thread Chris Ridd
"; my $ldap = Net::LDAP->new("10.19.15.50") or die "$@"; my $mesg = $ldap->search( base => "ou=addresslist,ou=test,ou=cfmrs,ou=sftaccess,o=sft", scope => $scope, attrs => ['*', &#

Ldap search does not return expected result

2007-12-06 Thread Brian G
.19.15.50") or die "$@"; my $mesg = $ldap->search( base => "ou=addresslist,ou=test,ou=cfmrs,ou=sftaccess,o=sft", scope => $scope, attrs => ['*', 'dn'], ); Thanks.

Re: LDAP Search

2007-10-17 Thread Chris Ridd
On 16 Oct 2007, at 19:26, [EMAIL PROTECTED] wrote: Dear developers, I am trying to get some data from my ldap server, I have an administrative limit set to 10,000 (this means that only 10,000 objects will be returned from a search) and I have about 150,000 entries in my directory server, th

LDAP Search

2007-10-17 Thread PETER_CHARBEL
Dear developers, I am trying to get some data from my ldap server, I have an administrative limit set to 10,000 (this means that only 10,000 objects will be returned from a search) and I have about 150,000 entries in my directory server, the number of entries that match my criteria is higher than

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-13 Thread Graham Barr
ur code requesting each different range until >> you hit *. >> >> Don >> >> -Original Message- >> From: Megan Kielman [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, December 12, 2006 3:01 PM >> To: Don C. Miller >> Cc: Perl-LDAP Mailing List >> Subject

RE: Net::LDAP search - active directory not returning member list for large group

2006-12-13 Thread Don C. Miller
er 13, 2006 8:02 AM To: Don C. Miller Cc: Perl-LDAP Mailing List Subject: Re: Net::LDAP search - active directory not returning member list for large group Don, That dawned on me last night! I think I have one last questions regarding the '*'. Is that considered a wildcard? Since I cannot req

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-13 Thread Megan Kielman
code requesting each different range until you hit *. Don -Original Message- From: Megan Kielman [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 12, 2006 3:01 PM To: Don C. Miller Cc: Perl-LDAP Mailing List Subject: Re: Net::LDAP search - active directory not returning member list for

RE: Net::LDAP search - active directory not returning member list for large group

2006-12-13 Thread Don C. Miller
: Perl-LDAP Mailing List Subject: Re: Net::LDAP search - active directory not returning member list for large group Don, I can't seem to get Range=0-* to return anything. The best I have been able to do is query Range=0-1499, or another combination that is less then the total number of members

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-13 Thread Graham Barr
On Dec 12, 2006, at 12:58 AM, Glenn Lamb wrote: @members = $entry->get_value("member"); if (@members == 0) { $first = 0; while(1) { $last = $first + $size - 1; @tmp = $entry->get_value("member;range=${first}-${last}"); @tmp = $entry->get_value("member;range=${fi

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-12 Thread Megan Kielman
); die if ($group_search->code); print $group_search->entry(0)->dump; my @members = $group_search->entry(0)->get_value('member;Range=0-*'); print $#members; $ad_ldap->unbind; -Original Message- From: Megan Kielman [mailto:[EMAIL PROTECTED] Sent: Monday, Decembe

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-12 Thread Megan Kielman
'member;Range=0-500' returns 'member;Range=0-500' >> 'member;Range=0-1500' returns 'member;Range=0-*' (1500 is greater >> than >> the 1025 members) >> 'member;Range=0-*' returns 'member;Range=0-*' >> >&

RE: Net::LDAP search - active directory not returning member list for large group

2006-12-12 Thread Don C. Miller
0)->get_value('member;Range=0-*'); print $#members; $ad_ldap->unbind; -----Original Message- From: Megan Kielman [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 9:58 PM To: Don C. Miller Cc: Perl-LDAP Mailing List Subject: Re: Net::LDAP search - active directory n

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-12 Thread Glenn Lamb
s) 'member;Range=0-*' returns 'member;Range=0-*' Keep in mind you can use the dump method to output a quick "raw" view of everything in the entry object. Don -Original Message- From: Graham Barr [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 4:51 PM

Re: Net::LDAP search - active directory not returning member list for large group

2006-12-11 Thread Megan Kielman
s) 'member;Range=0-*' returns 'member;Range=0-*' Keep in mind you can use the dump method to output a quick "raw" view of everything in the entry object. Don -Original Message- From: Graham Barr [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 4:51

RE: Net::LDAP search - active directory not returning member list for large group

2006-12-11 Thread Don C. Miller
essage- From: Graham Barr [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 4:51 PM To: [EMAIL PROTECTED] Cc: Perl-LDAP Mailing List Subject: Fwd: Net::LDAP search Begin forwarded message: > From: "Megan Kielman" <[EMAIL PROTECTED]> > Date: December 11, 2006 5

Fwd: Net::LDAP search

2006-12-11 Thread Graham Barr
Begin forwarded message: From: "Megan Kielman" <[EMAIL PROTECTED]> Date: December 11, 2006 5:41:02 PM CST Subject: Net::LDAP search Message-Id: <[EMAIL PROTECTED]> Graham, I hope it is ok that I am emailing you. Anyway, I am searching for groups in AD and writing the c

Re: Net::LDAP search object

2006-12-11 Thread Eric Nichols
Actually the limit is more like 1,500 members (I think depending on the version of AD). Try the following kb articles: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/enumerating_members_in_a_large_group.asp http://support.microsoft.com/kb/839424 It seems strange to me the

Net::LDAP search object

2006-12-11 Thread Megan Kielman
All, I have noticed that when I attempt to return the members of a group object in Active Directory using the "member" attribute, it doesn't return any members. However, if I look up the group using Active Directory Users and Computers (MS mmc) the group does in fact have members, although they a

Re: LDAP search question

2006-06-27 Thread Marc Chantreux
le 26/06/2006, Chris Ridd nous écrivait : > As long as you can express the conditions in an LDAP search filter, then > just go and do the search, requesting no attributes back (for efficiency). > Then obtain the result count using $mesg->count(). I think that Aamos wants something l

Re: LDAP search question

2006-06-26 Thread Chris Ridd
ses,than getting the results > and count them myself in my java program? As long as you can express the conditions in an LDAP search filter, then just go and do the search, requesting no attributes back (for efficiency). Then obtain the result count using $mesg->count(). Cheers, Chris

LDAP search question

2006-06-26 Thread amos_s12
Hello everybody; Assume I want to get the number of results of a certain object class, that fulfil certain conditions. Is there a better way to do it like select count(*) in relational databases,than getting the results and count them myself in my java program? Thanks ahead, Aamos

Re: Variable wierdness in LDAP search

2006-05-06 Thread Erich Weiler
Good lord I'm embarrassed. I've been looking at this thing for hours and didn't notice the single quotes. Thanks for pointing that out! (even though it had nothing to to with the Net::LDAP module itself!) :) ciao, erich Chris Ridd wrote: On 6/5/06 5:39, Erich Weiler <[EMAIL PROTECTED]> wro

Re: Variable wierdness in LDAP search

2006-05-06 Thread Chris Ridd
On 6/5/06 5:39, Erich Weiler <[EMAIL PROTECTED]> wrote: > What I CAN'T seem to do is replace 'cn=staff' with a variable, like > 'cn=$ARGV[0]'. When I do that the search doesn't work. Maybe it's > actually searching for the string '$ARGV[0]' instead of actually > inserting the value of the variab

Variable wierdness in LDAP search

2006-05-06 Thread Erich Weiler
Hi ya'll, I was hoping someone could shed some light on this problem I'm having with Net::LDAP. I'm trying to write a bit of perl code that does an LDAP search and returns, via STDOUT, the value of an attribute in the LDAP database. In this case, I want the value of &qu

Re: LDAP search question

2006-03-16 Thread Chris Ridd
using 'dn => "cn=root,dc=lam", you just pass it as '"cn=root,dc=lam"'. Read the Net::LDAP documentation! > my $searchbase = 'ou=homes,dc=lam'; > > my $filter = "(cn=*)"; > > my $attrs = "mail"; > > my $res

LDAP search question

2006-03-16 Thread TwistFactory
Hi guys, I'd like to start automating a few things on my LDAP server with Perl but I haven't been able to successfully log in and search yet. In LDAP Administrator, my base DN is dc=lam and my username is cn=root,dc=lam. What am I doing wrong to grab a set of entries similar to cn=hm-6YOC8298,ou=h

RE: LDAP Search Question

2005-03-28 Thread Liebeskind Uri \(liu\)
tion failed!", $@; # BIND TO LDAP USER my $rc = $ldap->bind( $user, password => $pwd); die $rc->error if $rc->code; # SEARCH LDAP FOR EACH USER for my $userID (@userList) { my $filter = "(&(objectclass=user)(objectcategory=user)(cn=$userID))"; my $search = $l

Re: LDAP Search Question

2005-03-26 Thread Peter Marschall
Dear Mir biggin, you sent your mai lto a public mailing list but adressed it only to Graham Barr. So I received your mail in error and hereby I inform you about your error. Yours Peter Marschall PS: AFAIK Graham does not respond to mails about perl ldap-sent to his private mail address.

LDAP Search Question

2005-03-25 Thread randy.m.briggin
=> $port) or die $@;   my $rc = $ldap->bind( $user, password => $passwd,); die $rc->error if $rc->code;   ## # Callout A ## my $search = $ldap->search (     base   => $base,     scope  => $scope,

Re: ldap search filter

2005-01-19 Thread Chris Ridd
On 19/1/05 8:09 pm, sharib <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am having a weird problem with the ldap search filter. Here it is > > when using the filter (&(Title=training*)(Owner=*e7001*)), i get 1 > result out of the total of 2 entries that i sho

[Fwd: ldap search filter]

2005-01-19 Thread Graham Barr
Original Message Subject: ldap search filter From:"sharib" <[EMAIL PROTECTED]> Date:Wed, January 19, 2005 2:05 pm To: [EMAIL PROTECTED] -

ldap search filter

2005-01-19 Thread sharib
Hi, I am having a weird problem with the ldap search filter. Here it is when using the filter (&(Title=training*)(Owner=*e7001*)), i get 1 result out of the total of 2 entries that i should get. One entry that is being missed is however returned when the use the following filter (&am

Re: LDAP search - How do you set size limit on returned values from search

2005-01-07 Thread Chris Ridd
However, I can not see how I am able to > achieve this using Net::LDAP::Search. > > I can not afford to set the size limit at the LDAP > server end as this will increase its workload. > > Please can you advise me a method I should follow to > set the size limit from client

LDAP search - How do you set size limit on returned values from search

2005-01-07 Thread abdul mulla
300 entries if size limit is not defined by the ldap client. Usually the I would pass '-z' switch in ldapsearch utility to set the number of returned values. However, I can not see how I am able to achieve this using Net::LDAP::Search. I can not afford to set the size limit at the LDAP

Re: Problems with entries-Method in Net::LDAP::Search

2004-09-14 Thread Karsten Gorling
* Graham Barr <[EMAIL PROTECTED]> [040914 19:13]: > >while ( defined(my $entry = <@entries>) ) { > > Try > > foreach my $entry (@entries) { Ok, thank you, that did it. It seems, I misunderstood the angle-Operator for quite a while :-( -- Wurstsonderpostenladen -> JabberID [E

Re: Problems with entries-Method in Net::LDAP::Search

2004-09-14 Thread Graham Barr
On 14 Sep 2004, at 18:04, Karsten Gorling wrote: Hi, there I'm doing currently some work with Net::LDAP and have encountered a very wierd problem, but perhaps I'm just crosseyed. Here is a minimal-example of code, that doesn't work properly: while ( defined(my $entry = <@entries>) ) { Try for

Problems with entries-Method in Net::LDAP::Search

2004-09-14 Thread Karsten Gorling
EMAIL PROTECTED]"; #$ldap->debug(15); my $bind = $ldap->bind ( "", sasl => $sasl, version => 3, onerror => 'warn', async => 1, ); pr

Re: Net::LDAP::Search Search.pod v1.5

2004-08-30 Thread Peter Marschall
Hi Ulrich, On Wednesday 11 August 2004 15:41, Ulrich Windl wrote: > studying the documentation of Net::LDAP::Search's sorted routine, I was > wondering > whether the routine uses LDAP's object comparison methods (which would > be rather > heavy weighted). The documentation is unclear about that:

Re: modifying values inside an ldap search container

2004-08-17 Thread Graham Barr
structure it need to go back However I cannot find the method to do it. Is it possible to do what I am asking? More to the point, should I be doing what I'm asking? How is it done? Your search will return a Net::LDAP::Search object from which you can get the Net::LDAP::Entry objects. Net:

modifying values inside an ldap search container

2004-08-13 Thread Peter Church
Hi, I hope this makes some sense and I am using the ldapsearch container in a valid way. I am currently writing some programs that will take standard templates from an ldap database modify them then write the entries back to the database. I perform an ldapsearch and I get my results back in th

Net::LDAP::Search Search.pod v1.5

2004-08-13 Thread Ulrich Windl
Graham, studying the documentation of Net::LDAP::Search's sorted routine, I was wondering whether the routine uses LDAP's object comparison methods (which would be rather heavy weighted). The documentation is unclear about that: --- =item sorted ( [ ATTR_LIST ] ) Return a list of L objects, sort

LDAP Search over 2 BaseDNs

2004-03-11 Thread Jeff Knudson
I am using Apache2.0.48 with mod_auth_ldap and am having a problem composing a search. I have a tree with a single Organization containing three primary OU's under it. I want to create an access control file which will allow any valid user under either of the first two OU's to authenticate, b

Re: ldap search filter problem

2003-12-10 Thread Chris Ridd
On 10/12/03 11:17 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hey, > > I tried by authenticating as the root but it still fails.I checked the > config files and it ssays that read on all attributes is allowed for al > lusers. > > I cant understand why just the and operator is failing desp

Re: Fwd: ldap search filter problem

2003-12-10 Thread sharib . khan
Hey, I tried by authenticating as the root but it still fails.I checked the config files and it ssays that read on all attributes is allowed for al lusers. I cant understand why just the and operator is failing despite any restrictions. Any clues sharib

Re: Fwd: ldap search filter problem

2003-12-10 Thread Jim Harle
t; into your perl code. The reverse might not work because Net::LDAP is more > > forgiving about missing outer ()s than ldapsearch. > > > > --Jim Harle > > > > On Fri, 5 Dec 2003, Graham Barr wrote: > > > > > Begin forwarded message: > > >

Re: Fwd: ldap search filter problem

2003-12-09 Thread sharib . khan
iving about missing outer ()s than ldapsearch. > > --Jim Harle > > On Fri, 5 Dec 2003, Graham Barr wrote: > > > Begin forwarded message: > > > From: [EMAIL PROTECTED] > > > Date: 5 December 2003 22:23:49 GMT > > > To: [EMAIL PROTECTED] > > >

  1   2   >