I am running Perl as a CGI (and, yes, I have begged and begged Sys. Admin's to get mod_perl on there, but to no avail) on Apache. I have a page where user's can go to and modify some of their own LDAP attributes. Before they reach the page, Apache challenges them for authentication (via mod_auth_kerb). Once they are authenticated, I can look in
$ENV{'REMOTE_USER'} to get their username and run a query against LDAP via this trimmed down code:
my $ldapObj = Net::LDAP->new($server);
$ldapObj->bind; # bind anonymously
my $ldapSearchUser = $ldapObj->search(base => 'o=isp',
filter => '(uid=' . $ENV{'REMOTE
+_USER'}. ').);
After they make some modificatication(s) to their information, I need to bind back to the LDAP server as the user who logged on to the web page. Something like:
$ldapObj->bind($dn, $ENV{'PASSWORD'})
The problem being, there is no
$ENV{'PASSWORD'}. Is there any way I can get Perl (as CGI) to access the password the user logged in with?
Thanks,
enoch
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.