logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [openldap] The server is referring the client to another server: msg#00018

Subject: Re: [openldap] The server is referring the client to another server
ok ! I got referrals uri,But how to know what dn referral to  those
referrals?


  use Net::LDAP;


use Encode::TW;
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_text ldap_error_name ldap_error_desc);
$Server="211.x.x.x";
$BaseDN="cn=Manager,dc=prog,dc=com,dc=tw";
$Passwd="abc123";
$DN=shift || "dc=prog,dc=com,dc=tw";

my $ldap=new Net::LDAP($Server);
my $mesg=$ldap->bind("$BaseDN",password=>"$Passwd",version => 3);
warn ("0,binding fail with ",ldap_error_text($mesg->code()),"\n") if
$mesg->code();




$binddn=$DN;
Encode::from_to($DN , "big5", "utf-8") ;
my $i=0;
$r=$ldap->search(base=>"$DN",scope=>"sub",filter=>"(objectClass=*)",
callback =>\&process);



  sub process {
    my $mesg = shift;
    my $obj = shift;

    if (!$obj) {
      # Search complete

    }
    elsif ($obj->isa('Net::LDAP::Reference')) {
      my $ref;

      foreach $ref ($obj->references) {
       print $ref , "\n";
        # process ref
      }
    }
    else {
      # Process Net::LDAP::Entry

    }
  }
"News.Hinet.Net" <luke@xxxxxxxxxxxxxx> ¦b¶l¥ó
news:20040909144608.4611.qmail@xxxxxxxxxxxxxxxxxxxx ¤¤¼¶¼g...
> The ldap_error_text($mesg->code()) ahow this messgae when i search an ou
> that referral
> to another server. Ok! I know this is a referral .But how to solve this
> problem?
> How to search the remote server data and what is the server info ?
>
>






Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>