Here is the code:
use Net::LDAP;
$ldap = Net::LDAP->new('invdc01.cent.org') or die "Failed to connect";
$ldap->bind() or die "failed to bind";
$mesg = $ldap->search (
sizelimit => 0,
attrs => ['dn'],
base => 'DC=CORP,DC=Cent,DC=ORG',
scope => 'sub',
filter => "(objectclass=top)",
) or die "failed to search" ;
foreach $entry ($mesg->all_entries) { $entry->dump; }
$ldap->unbind;
All I get back are computer accounts not a single user.
I have also tried:
filter => "(&(objectCategory=person)(objectClass=user))",
but I get nothing back.
Any ideas?
Thank you,
Patrick Sullivan
|