Leif has got a winner!

At 02:56 PM 2/6/01 -0800, Leif Hedstrom wrote:
>Billy Joedono wrote:
>
> >     $ld=&LdapOpen($ldaphost,$ldapport,$dnmanager,$dnpassword);
> >      $Entry= $ld->search($basedn,'sub',$user,0);
> >      while ($Entry) {
> >        $Entry->{userpassword}[0]= $ldapass;

simpy change to:      $Entry->setValues("userPassword", $ldappass);

> >        $ld->update($Entry);
> >        $my_dn= $Entry->{cn}[0];
> >        print h2("Password Changed!");
> >        print p("Your LDAP password is changed!");
> >        print p("Use you browser's BACK button for other menus");
> >        $Entry= $ld->nextEntry();
> >      }
>
>What version of PerLDAP are you using? Have you tried using Entry::setValues()
>instead of setting it "manually"? Both ways should work, but maybe there's a
>bug somewhere in PerLDAP... :(

Apparently, they are different, in this case at least. Maybe because this 
is always a single-valued attribute? Anyway, I am using perldap 1.4.1, perl 
5.005, openldap 1.2.11, linux 2.2.14. Thanks for the pointer.

>-- Leif

Regards,
Billy

***************************************************************************
        Thanks and regards,
        Andang Nugroho

        "Courtesy comes by default, but respect I gotta earn"
***************************************************************************

Reply via email to