From: Clif H. <cl...@di...> - 2001-04-19 21:22:26
|
> > I am trying to access Active directory using Perl-ldap and I'm having a > problem. Here is sample code: > > my $base = 'DC=edinboro,DC=edu'; > my $filter = "(objectclass=*)"; > my $attrs = (); # request all available attributes > my $scope = '0'; > > my $ldap = Net::LDAP->new($ldapserver,debug=>$DEBUG) or die "$@"; > > # bind to a directory with dn and password - makes no difference whether > authenticated or not > $ldap->bind (dn => $admin,password => $password) or die "$@"; > > $mesg = $ldap->search( > scope => $scope, > base => $base, > filter => $filter, > attrs => $attrs, > ); > > If I do a search, all I can manage to find is the base DN. If I change the > scope to 1, I retrieve nothing. If I change the scope to 'subtree', all I > retrieve are root entries. I see no cn or ou entries. Nor do I retrieve > anything if I set my base to cn=users,dn=edinboro,dn=edu. I've run the same > search against ldap.itd.umich.edu and I can retrieve anything I request. > Also if I use MS LDP (even if not authenticated), the search pulls the > entries, as it is suppose to. I've checked permissions on the server but I > am at a loss. Is there anything special I need to make Active Directory work > correctly with LDAP? > > Thanks in advance, > > William Richter > Technology Specialist, Edinboro University of PA 814-732-2931 > Try requesting a return attribute(s) in your request. attrs => ["*"], If I do what you have done all I get is a DN but no data. Regards, Clif Harden INTERNET: c-h...@ti... |