[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-ldap-dev
Subject: Re: perl ldap windows 2000
From: Christopher A Bongaarts <cab () tc ! umn ! edu>
Date: 2001-07-23 18:25:16
[Download RAW message or body]
As Emeric LOISEAU once put it so eloquently:
> Can you tell me, if the perl can read active directory in windows 2000
> server.
This worked for me:
#!/usr/local/bin/perl
use Net::LDAPS;
# actual application uses Net::DNS to find SRV records for LDAP service
$ldaps = new Net::LDAPS('foo.umn.edu', port => 636) or die;
$ldaps->bind(dn => 'cn=Administrator, cn=Users, dc=foo, dc=umn, dc=edu',
password => 'PASSWORD',
version => 3
);
$mesg = $ldaps->search(
base => 'dc=foo, dc=umn, dc=edu',
filter => 'cn=Test User'
);
$mesg->code && die $mesg->error;
foreach $entry ($mesg->all_entries) { $entry->dump; }
$ldaps->unbind;
%% Christopher A. Bongaarts %% cab@tc.umn.edu %%
%% Internet Services %% http://umn.edu/~cab %%
%% University of Minnesota %% +1 (612) 625-1809 %%
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic