From: Nitin G. <sla...@re...> - 2001-10-25 10:05:12
|
=0D=0A=0D=0AOn Thu, 25 Oct 2001 Chris Ridd wrote :=0D=0A> Nitin Gaur <slash= bi...@re...> wrote:=0D=0A> > =0D=0A> > Hi all,=0D=0A> > this is my f= irst post to this list.=0D=0A> > I am using RH 7.1 with perl-ldap-0.2401=0D= =0A> > I got my first problem as=0D=0A> > it is unable to bind =0D=0A> > ne= ither anonymously:=0D=0A> > $ldap->bind();=0D=0A> > code returned is 32=0D= =0A> > nor as a user:=0D=0A> > in this as code returned is 49 .=0D=0A> > = =0D=0A> > thanks in advance=0D=0A> > -Nitin Gaur=0D=0A> > Sr. Programmer An= alyst=0D=0A> > Adroit Computer Technique=0D=0A> > New Delhi.=0D=0A> =0D=0A>= You may want to look at Net::LDAP::Utils::ldap_error_nam-=0D=0A> e() to fi= nd out=0D=0A> what error codes mean, which should help you understand =0D= =0A> what's happening.=0D=0A> 32 is no such object, and 49 is invalid crede= ntials. =0D=0A> I'm not certain how=0D=0A> you can get no such object from = an anonymous bind... =0D=0A> what else do you see=0D=0A> in the result obje= ct? (eg $res->dn(), $res->error().)=0D=0A> =0D=0A> To do an anonymous bind,= do it this way:=0D=0A> =0D=0A> $ldap->bind(anonymous =3D> 1);=0D=0A> =0D= =0A> To do a bind using simple auth, do it this way:=0D=0A> =0D=0A> $ldap-= >bind("cn=3DChris Ridd,o=3DMessagingDirect,c=3DCA",=0D=0A> = password =3D> "mypassword");=0D=0A> =0D=0A> (or whatever your DN and pa= ssword are.)=0D=0A> =0D=0A> Works for me!=0D=0A> =0D=0A> Cheers,=0D=0A> =0D= =0A> Chris=0D=0A=0D=0AThanks Chris,=0D=0AIt finally worked!=0D=0AAs I am ne= w to all this, I could not interpret the error code.I should have known ins= tantly that problem lies in search()=0D=0A=0D=0AAnyway thanks for all of yo= u!=0D=0A-Nitin=0D=0A=0D=0A =0A |