From: Wilbur M. S. I. <ph...@th...> - 2003-01-15 16:30:36
|
I've got attribute pulling down okay thanks to the great examples and perldoc. However I am having a hard time figuring out how to simply pullout everyone's DN. use Net::LDAP; $ldap = Net::LDAP->new('some.dir') or die "$@"; $mesg = $ldap->bind("cn=bindme, ou=Hosts, o=Some Location, c=US", password => "weakpassword", version => 3); $mesg = $ldap->search ( # perform a search base => "ou=Users,o=Some Location,c=US", filter => "(&(objectclass=inetOrgPerson))" $mesg->code && die $mesg->error; |---- foreach $entry ($mesg->all_entries) { ||---- foreach $attr ($entry->attributes) { || \\ --> what changes here to pull the DN as opposed to attributes? Please respond directly as I couldn't find subscription information for the list. Ie; I just want to gank... "dn: uid=user, ou=thing, ou=Users, o=Some Location, c=US" Thanks for any assistance... I feel like I should have been able to figure out how to do this from the perldoc - so slap me if needed :/ |