cerror has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I'm working on a portal page which will allow users to change their own password, which is kept in LDAP, however, I'm having trouble getting my sub to actually update the password. I'm using Net::LDAP. Assuming we're connected to LDAP correctly, can you guys/gals spot any problems with this code?
sub updateLDAPpass { my ($user, $pass) = @_; my $mesg = $ldap->bind( "cn=Manager,dc=domain,dc=net", password => 'password' ); my $dn = "cn=$user,dc=domain,dc=net"; my $cryptPword = cryptPass($pass); $cryptPword = "{crypt}". $cryptPword; $mesg = $ldap->modify("$dn", changes => [ replace => [ userPassword => "$cryptPword" +]] ); }
Thanks!
- cerror
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem with LDAP modification
by naChoZ (Curate) on Dec 20, 2007 at 22:00 UTC | |
by Anonymous Monk on Dec 29, 2007 at 01:15 UTC |
Back to
Seekers of Perl Wisdom