Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
This is really more LDAP-specific than Perl-specific, but it's a bit of both as it has to do with how you're attempting to use the API provided by the module.

The compare method of Net::LDAP requires the distinguished name of the entry you're trying to compare against. You're comparing against your $base (is it still "dc=example,dc=com" (your LDAP base) at this point?) instead of the particular distinguished name you want "uid=srinivas,ou=People,dc=example,dc=com". There's no such attribute "uid" in entry "dc=example,dc=com", in case that's where you're looking.

What you probably mean to do is to do a search of entries for "uid=srinivas,ou=People,dc=example,dc=com" and then compare your hashed password to the hashed password there (and possibly also check the uid attribute as a sanity check).

BTW, you didn't just post an actual MD5 hashed Unix system account password to a public forum, did you? If so, you might want to change the password on that account and any others you have that use the same password. It takes some time to run a brute-force crack against MD5, but lots of people have nothing better to do than to put a cluster of four systems at work on it while they go about other things.


In reply to Re: Need help on Net::LDAP by mr_mischief
in thread Need help on Net::LDAP by srinivas_rocks

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (5)
    As of 2014-07-26 12:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (176 votes), past polls