in reply to Active Directory DC and OU
<psychic>
You can query an active directory's LDAP entries using the perl modules Net::LDAP or Net::LDAP::Express.Example:
use Net::LDAP; $ldap = Net::LDAP->new( 'pdc.foobar.com' ) or die "$@"; $mesg = $ldap->bind ; # an anonymous bind $mesg = $ldap->search( # perform a search base => "c=US", filter => "(&(cn=Some Loser))" ); $mesg->code && die $mesg->error; foreach $entry ($mesg->entries) { $entry->dump; } $mesg = $ldap->unbind; # take down session
</psychic>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Active Directory DC and OU
by strat (Canon) on Apr 19, 2006 at 08:04 UTC |