From: Murugan K G <mur...@ya...> - 2002-06-05 10:55:31
|
Hi Chris Thanks for your immediate response. I am binding with LDAP3 only as $ldap->bind('admin',password => 'novell', version=>3) or die "Not able to bind"; and also i tried without RequestValue and getting the same result. Any more ideas? Do you people have any sample script for extensions. Thanks in advance. Regards K.Murugan use Convert::ASN1; use Net::LDAP qw(:all); use Net::LDAP::Util qw(ldap_error_name ldap_error_text) ; # use for Error handling require Net::LDAP::Extension; require Net::LDAP::Message; $ldap = Net::LDAP->new("164.99.150.133") or die "$@"; print $ldap->{error}; $asn = Convert::ASN1->new; $ldap->bind('admin',password => 'novell', version=>3) or die "Not able to bind"; my $mesg = $ldap->message('Net::LDAP::Extension' => $arg); $ldap->start_tls(); $mesg->encode ( extendedReq =>{ requestName => "2.16.840.1.113719.1.27.100.9" } )or die "Not able to encode the extended values\n"; $response=$ldap->_sendmesg($mesg) or die "Not able to send message\n"; $mesg->sync(); if( $mesg->code ne LDAP_SUCCESS) { print "LDAP ERROR\n "; print "The response name is ". $response->{responseName}; $ldap->unbind(); } else { print "The response name is ". $response->{responseName}; print "The junk\n".$response->{response}; $ldap->unbind(); } print "Ldap extension operation result", ldap_error_name($mesg->code),"\n"; print $mesg->error; # print $mesg->mesg_id; --- Chris Ridd <chr...@me...> wrote: > Murugan K G <mur...@ya...> wrote: > > Hi LDAP gurus > > I am trying to develop one perl module for > > "RefreshLDAPServerRequest" eDirectory extension > > as below. While executing this script , i am > getting > > LDAP_INSUFFICIENT_ACCESS message code and > > Insufficient access message error. Here i logged > in > > with admin rights only. After that also , i am > > getting the same. Any help greatly appriciated. > > > > Am i doing anything in the script?. > > > > Regards > > K.Murugan > > > > > > > > use Convert::ASN1; > > use Net::LDAP qw(:all); > > use Net::LDAP::Util qw(ldap_error_name > > ldap_error_text) ; # > use > > for Error handling > > require Net::LDAP::Extension; > > require Net::LDAP::Message; > > > > $ldap = Net::LDAP->new("xxx.xx.xxx.xxx") or die > "$@"; > > print $ldap->{error}; > > $asn = Convert::ASN1->new; > > $ldap->bind('username',password => 'password') or > die > > "Not able to bind"; > > Are you sure you're binding with LDAPv3? You won't > be able to do any > extended operations against a server using LDAPv2. > Net::LDAP's default is > LDAPv2. > > You also have this: > > > requestValue => null > > I'm not sure what you intended here. Do you need an > ASN.1 NULL value to get > encoded at this point? The requestValue is defined > as OPTIONAL in the ASN.1 > so if you don't need one, simply don't set > requestValue in the encode(). > > Cheers, > > Chris > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application > Developer's Conference > August 25-28 in Las Vegas -- > http://devcon.sprintpcs.com/adp/index.cfm > __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |