Cmdr_Tofu has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/perl/bin/perl -w use Net::LDAP; my $dc = 'my Active Directory's Servers Ip' my $ldap = Net::LDAP->new($dc) or die $@; my $rootdse = $ldap->root_dse(attrs=>['defaultNamingContext']); my $base = $rootdse->get_value('defaultNamingContext'); my $user = 'mySuperuser@ad.mydomain.com'; my $password = 'mySuperUserPassword'; my $rc = $ldap->bind ($user, password=>$password); die $rc->error if $rc->code; my $scope="subtree"; my $filter="(&(objectClass=organizationalPerson))"; my $attrs=['distinguishedName']; my $search=$ldap->search( base => $base, filter => $filter, attrs => $attrs ); die $search->error if $search->code; foreach my $entry ($search->entries) { $entry->dump; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::LDAP Sizelimit exceeded error
by mojotoad (Monsignor) on Mar 20, 2003 at 23:07 UTC | |
by Cmdr_Tofu (Scribe) on Mar 21, 2003 at 01:58 UTC | |
by Anonymous Monk on Sep 14, 2007 at 10:55 UTC | |
by Anonymous Monk on Mar 13, 2009 at 11:22 UTC |