It looks like you have a very old version of Net::LDAP, back when it
inherited from IO::Socket. So you will need to call ->ldapbind
bit I suggest you upgrade to thr latest release of Net::LDAP
Graham.
On Wed, Sep 27, 2000 at 05:55:19PM -0700, Lambright, Linda (N-Averstar) wrote:
> When I execute the code below I receive this error message, does anyone have
> any ideas as to what's causing this? I took this code almost completely out
> of
> one of Graham Barr's emails.
>
> usage: $fh->bind(NAME) or $fh->bind(PORT, ADDR) at ./perlpwchange line 6
>
>
> #!/usr/local/bin/perl
> use Net::LDAP;
>
> $ldap = new Net::LDAP('122.197.44.555');
>
> $ldap->bind (
> dn => 'uid=kbosworth, ou=People, o=linda.lmco.com',
> password => 'oldpassword'
> ) || die $@;
>
> $ldap->modify ('uid=kbosworth,ou=People,o=linda.lmco.com',
> replace=>{'userpassword'=> "newpassword"})
> || "failed to edit entry. $!";
>
> $ldap->unbind;
>
>
> > ----------
> > From: Lambright, Linda (N-Averstar)[SMTP:lin...@lm...]
> > Sent: Wednesday, September 27, 2000 1:51 PM
> > To: per...@li...
> > Subject: User password changing
> >
> > I am trying to write a script to allow users to change their own passwords
> > usingv Perl-ldap and the Netscape
> > Directory Server. Is it possible for users to change their own passwords
> > using their own
> > authentication or is it necessary to use the Directory Manager password in
> > the background to make that change.
> >
|