From: Matt Mencel Date: 2008-11-15T06:47:09+09:00 Subject: Re: Active Directory access - not just users, but computers too Aldric, Any chance you would be willing to share the code you used to access AD via LDAP? I've tried the ActiveLdap and ActiveDirectory gems and so far have not had any success. Thanks, Matt ----- Original Message ----- From: "Aldric Giacomoni" To: "ruby-talk ML" Sent: Friday, November 14, 2008 9:37:15 AM GMT -06:00 US/Canada Central Subject: Re: Active Directory access - not just users, but computers too Thank you to everyone - it's working like a charm! Clifford Heath wrote: > brabuhr@gmail.com wrote: >> (first hit on google for "ldap active directory query examples") >> Filter for computers: >> (objectCategory=computer) > > You can do this query using either objectClass or objectCategory. > objectClass is indexed but objectCategory is not indexed. If you > query a large domain using the unindexed attribute, the query > interrogates *every* object in the domain. Traps for the unwary ;-) > > If you want just the users, no computers, you need: > (&(objectCategory=person)(objectClass=user)(!objectClass=computer)) > > The rest of brabuhr's advice is good. > > Clifford Heath.