Hi, i just test PasswordPolicy and want to modify passwords with Net::LDAP::Extension::SetPassword, but when i run this script, $msg->gen_password() creats a random password and modifies newpassword=> with the radom generated value instead of the defined password. Is this a bug or is my script bogus. The docs say
gen_password ( ) Return the password generated in the previous "set_password()" call. ,----[ password.pl ] | use Net::LDAP; | use Net::LDAP::Extension::SetPassword; | my ($ldap,$msg); | my $host = 'ldap://localhost'; | | $ldap = Net::LDAP->new( $host ); | $ldap->bind('cn=Foo Bar,ou=Mitarbeiter,o=avci,c=de', | password=> '0J2zrRpD'); | $msg = $ldap->set_password( | oldpassword=> '0J2zrRpD', | newpassword=> 'RfgZzU2' | ); | die "Fehler: ",$msg->code(), ":",$msg->error() if ($msg->code()); | | print "new password is: ", $msg->gen_password() , "\n"; | $ldap->unbind(); `---- -Dieter -- Dieter Klünter | Systemberatung http://www.dpunkt.de/buecher/2104.html sip: +49.180.1555.7770535 GPG Key ID:8EF7B6C6 53°08'09,95"N 10°08'02,42"E