I have a strange behaviour of applied filter on my program. It uses Net::LDAP to fetch object information from Microsoft Active Directory. Group and Computer objects can have "managedBy" attribute set on them, this attribute, if set, uses object distinguished name (DN) as its syntax. When i try to search all computer objects with managedBy attribute against string *Administrator*, i don't get any returned objects, altough i can verify otherwise that this user is found on managedBy attribute on several computer objects. Same thing when trying to search group objects where Administrator is found in managedBy

Note that i use wildcards, as they are supported on LDAP filters, far as i know. I'm also using user Administrator just as an example here. If i replace *Administrator* string with the complete user DN, i get the expected results, but i'm aiming to simplify things here.

Administrator DN:

CN=Administrator,CN=Users,DC=domain,DC=ad,DC=local

Applied filter:

(&(objectClass=computer)(managedBy=*Administrator*))

In reply to Net::LDAP problem with wildcard on applied filter by mellin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.