I'm having trouble with a Net::LDAPS bind operation. I'm able to use this dn when doing ldap searches
ldapsearch -b "ou=mail aliases,dc=mydomain,dc=com" -D cn=manager,dc=my
+domain,dc=com -w 'ch@t!!' "uid=rjm"
I had this Net::LDAPS bind using CGI params
#this bind worked
#$message = $ldap->bind( $entry->dn(), password => "${password}" );
but I want to change it to hardcode the dn and password
#this bind works, I'm using my personal account and password
#$message = $ldap->bind( 'uid=rjm,ou=people,dc=mydomain,dc=com', passw
+ord => 'mypass' );
#I'm having trouble binding as manager. Is the syntax correct? This
+gives me $message->code == LDAP_INVALID_CREDENTIALS
$message = $ldap->bind( 'cn=manager,dc=mydomain,dc=com', password => '
+ch\@t!!' ); #\ before @ ok?
if ( $message->code == LDAP_INVALID_CREDENTIALS ) {
print_form("Invalid username or password.");
exit(0);
}
if ( $message->is_error() ) {
die( $message->error() );
}
Am I doing something wrong with the third bind attempt? thanks.
Update:Thanks, this is an stunnel related problem.
20080111 Janitored by Corion: Restored original content
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.