Dear Mr. Barr:

I'm starting to use your Perl LDAP module.

Thank you for providing to everyone.

I have a problem with a simple search, but I can't find anything on the net about so I'm writing you.

With my code, when I do a narrow search in the search filter, I can easily obtain results, but when I make the search filter for everthing (objectclass=*), it doesn't return anything.� I think it's because it's returning such a large return (approx 117,000 entries) that it's filling up ram.�� Is this correct.� If so, how do get the search to print out an entry each time it finds one?

Sincerely,

Tom

-------------------------------------
use Net::LDAP;
use Net::LDAP::LDIF;
#use Net::LDAP::Entry;

$username="cn=directory manager";
$password="password123";
$hostname="hostname4";
$port="389";
$basedn="ou=people,o=company.com";
$scope="sub";
$filter="objectclass=*";
@attribs= qw(*);
$|=1;� # I'm hoping this would allow the entries to be printed out as soon as they are gotten.

my $conn = new Net::LDAP ( "$hostname", port=> "$port");

if (!$conn)
�{
�print "Error opening connection!";
�}

$conn->bind( dn => "$username",
������������ password =>"$password",
����� version => 3 );
������������
$mesg = $conn->search(
�base� => "$basedn",
�scope => "$scope",
�filter=> "($filter)",
�attrs => [EMAIL PROTECTED] );

Net::LDAP::LDIF->new( \*STDOUT,"w")->write( $mesg-> entries);�

$conn->unbind;
__________________________________________________


Reply via email to