And to further expound.. I think this would be well-suited for an ADODB query, using the LDAP filter that was provided, on the object that you specified.
(&(objectcategory=person)(objectclass=user)) For an example of an ADODB query using LDAP, and similar filters (if you are not familiar with them), check out Win32::Exchange found on CPAN (http://search.cpan.org) and the _AdodbExtendedSearch function. This function searches an entire LDAP server (AD) for particular information, and you'd want to replace the second parameter with your path at the OU you want to search. :) Steven -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe Sent: Tuesday, October 12, 2004 6:46 AM To: 'Hon Shi'; [EMAIL PROTECTED] Subject: RE: drilling for users - ldap I assume this is active directory. With that in mind you can look at objectcategory or objectclass, either will work though objectclass is multivalued and you would have to parse through the values. For objectcategory values the following can contain users CN=Builtin-Domain, blah CN=Container, blah CN=Organizational-Unit, blah CN=Domain-DNS, blah Obviously there is no reason to return the OUs and containers at all. Just focus your search filter so it only returns user objects (&(objectcategory=person)(objectclass=user)) joe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hon Shi Sent: Tuesday, October 12, 2004 8:20 AM To: [EMAIL PROTECTED] Subject: drilling for users - ldap I'm trying to collect all the users in a OU tree. What do I inspect to determine if I'm in a container? $ldap->objectCategory(); returns CN=Organizational-Unit,CN=Schema,CN=Configuration,DC=rayo,DC=net Seems like it would work - inspect the leading CN value. Is this how it's done? I also see the attribute 'Class' listed the built in properties forr a user, but not in an ou container. Thanks __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
