Hi,
I just add myself to this list, checked the archive for the above subject
but couldn't find, so hopefully I don't repeat a recent subject.
I am trying to write a CGI for our users to change their LDAP password via
web, and a piece of the code follows:
use Mozilla::LDAP::Conn;
require "ldap-lib.pl";
...
$ld=&LdapOpen($ldaphost,$ldapport,$dnmanager,$dnpassword);
$Entry= $ld->search($basedn,'sub',$user,0);
while ($Entry) {
$Entry->{userpassword}[0]= $ldapass;
$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();
}
Tried to bind both as the user itself and the dnmanager (above), but
failed. My slapd log does show the bind and search ops, but not the
update/mod. BTW, the ACL says access to userPassword is by self write and
by dn manager write.
Any pointers/suggestions will be greatly appreciated.
Cheers,
Billy
***************************************************************************
Thanks and regards,
Andang Nugroho
"Courtesy comes by default, but respect I gotta earn"
***************************************************************************