On 24/8/05 3:42, Gavin Henry <[EMAIL PROTECTED]> wrote:

> Dear List,
> 
> At:
> 
> http://search.cpan.org/~gbarr/perl-ldap-0.33/lib/Net/LDAP/Extension/SetPasswor
> d.pm
> 
> The example is:
> 
> ---------------
>  use Net::LDAP;
>  use Net::LDAP::Extension::SetPassword;
> 
>  $ldap = Net::LDAP->new( "ldap.mydomain.eg" );
> 
>  $ldap->bind('cn=Joe User,cn=People,dc=mydomain,dc=eg",
>              password => 'oldPassword');
> 
>  $mesg = $ldap->set_password( oldpasswd => 'oldPassword' );
> 
>  die "error: ", $mesg->code(), ": ", $mesg->error()  if ($mesg->code());
> 
>  print "changed your password to", $mesg->gen_passwd() , "\n";
> ---------------
> 
> There's no such subroutine/function as gen_passwd() it's gen_password()

Good catch. I'll commit a change to the docs shortly. (My svn logins are
failing ATM, hoping to catch Graham's eye..)

> On a side note, after sucessfully authenicating and changing a password,
> gen_password() doesn't actually print anything???

I'm not sure that it is guaranteed to return anything, unless you're using
the mode where the server generates a random password for you. This
behaviour might also depend on server/server configuration.

Cheers,

Chris


Reply via email to