From: Murugan K <kmu...@no...> - 2002-06-04 06:23:00
|
Hi I am very new to LDAP development. I want to write some perl modules for eDirectory extensions. Can you direct me to suitable documentation on web to proceed further related extended operations. Thanks in advance. Regards K.Murugan |
From: Murugan K <kmu...@no...> - 2002-06-04 06:51:33
|
Hi I am very new to LDAP development. I want to write some perl modules for eDirectory extensions. Can you direct me to suitable documentation on web to proceed further related extended operations. Thanks in advance. Regards K.Murugan |
From: Murugan K <kmu...@no...> - 2002-06-04 06:57:25
|
Hi I am very new to LDAP development. I want to write some perl modules for eDirectory extensions. Can you direct me to suitable documentation on web to proceed further related extended operations. Thanks in advance. Regards K.Murugan |
From: Murugan K G <mur...@ya...> - 2002-06-05 09:57:59
|
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"; my $mesg = $ldap->message('Net::LDAP::Extension' => $arg); $ldap->start_tls(); $mesg->encode ( extendedReq =>{ requestName => "2.16.840.1.113719.1.27.100.9", requestValue => null } )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; =head $result=Net::LDAP::Extension::response_name($mesg); $result=Net::LDAP::Extension::response($mesg); print $result; $asn = Convert::ASN1->new; print $asn->decode($response->{response}->{identity}) or die "Not able to decode the message\n"; # print "The value of the response name is ".$out->{responseName}; =cut __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |
From: Chris R. <chr...@me...> - 2002-06-05 10:21:33
|
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 |
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 |
From: Chris R. <chr...@me...> - 2002-06-05 11:05:46
|
Murugan K G <mur...@ya...> wrote: > 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? Since the Extended operation you're creating is a proprietary one from Novell, I would recommend reading Novell's documentation of it. It may be that there are some restrictions on its use that you haven't fulfilled yet! > Do you people have any sample script for extensions. The only Extended operation I can see in the Net::LDAP distribution is in Net::LDAP::start_tls(). That contains a minor buglet which was recently fixed - it used to say this: $mesg->encode( extendedRequest => { requestName => "1.3.6.1.4.1.1466.20037", } ); and it should say this: $mesg->encode( extendedReq => { requestName => "1.3.6.1.4.1.1466.20037", } ); Cheers, Chris |
From: Graham B. <gb...@po...> - 2002-06-05 11:19:30
|
On Wed, Jun 05, 2002 at 03:55:31AM -0700, Murugan K G wrote: > 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"; bind, like most Net::LDAP methods, will always return true. You need to check the ->code method of the object returned. Graham. |
From: Christopher A B. <ca...@tc...> - 2002-06-05 13:53:24
|
As Murugan K G once put it so eloquently: > I am binding with LDAP3 only as > $ldap->bind('admin',password => 'novell', version=>3) > or die "Not able to bind"; As Graham mentioned, be sure to check the result code; "or die" doesn't work here. You're using a fully qualified DN for the "username" right? Because "bind" doesn't search on uid for you... %% Christopher A. Bongaarts %% ca...@tc... %% %% Internet Services %% http://umn.edu/~cab %% %% University of Minnesota %% +1 (612) 625-1809 %% |
From: Jim H. <ha...@us...> - 2002-06-04 12:50:29
|
Please be more precise on what you want to do. There is a huge variety of things that can be done with eDirectory and other lDAP servers with Net::LDAP. --Jim Harle Murugan K wrote: > Hi > I am very new to LDAP development. > I want to write some perl modules for eDirectory extensions. > Can you direct me to suitable documentation on web to proceed > further related extended operations. > > Thanks in advance. > Regards > K.Murugan > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm |