Answering your responses,
>Are you sure you're getting an entry back from the search?
Yes,
Looking at the code again, if I do
$dummy= $Entry->{userpassword}[0];
print $dummy;
I can see my old password. On the same line, if I do
$Entry->{userpassword}[0]= $ldapass;
print $Entry->{userpassword}[0];
I can see that the $Entry is taking the new password.
$rcode= $ld->update($Entry);
Would return $rcode= 0.
>How many entries show up in the search result? (In the log the search
will list
>"nentries=n" where n=the number of entries.) And what's in $user?
Clip of the slapd log shows:
Feb 6 21:46:44 ldap slapd[23268]: conn=9 fd=7 connection from
ldap.test.com (192.168.10.15) accepted.
Feb 6 21:46:44 ldap slapd[25825]: conn=9 op=0 BIND dn="" method=128
Feb 6 21:46:44 ldap slapd[25825]: conn=9 op=0 RESULT err=0 tag=97 nentries=0
Feb 6 21:46:44 ldap slapd[25826]: conn=9 op=1 SRCH base="O=TEST,C=ID"
scope=2 filter="(alias=DOUG)"
Feb 6 21:46:44 ldap slapd[25826]: conn=9 op=1 RESULT err=0 tag=101 nentries=0
Feb 6 21:46:44 ldap slapd[25827]: conn=9 op=2 SRCH base="O=TEST,C=ID"
scope=2 filter="(cn=DOUG)"
Feb 6 21:46:45 ldap slapd[25828]: conn=9 op=3 SRCH base="O=TEST,C=ID"
scope=2 filter="(|(cn=* DOUG)(cn=DOUG*)(cn=* DOUG *))"
Feb 6 21:46:45 ldap slapd[25827]: conn=9 op=2 RESULT err=0 tag=101 nentries=0
Feb 6 21:46:45 ldap slapd[25829]: conn=9 op=4 BIND dn="CN=DOUG
TEST 125676,OU=EMPLOYEE,O=TEST,C=ID" method=128
Feb 6 21:46:45 ldap slapd[25828]: conn=9 op=3 RESULT err=0 tag=101 nentries=1
Feb 6 21:46:45 ldap slapd[23268]: conn=10 fd=11 connection from
ldap.test.com (192.168.10.15) accepted.
Feb 6 21:46:45 ldap slapd[25829]: conn=9 op=4 RESULT err=0 tag=97 nentries=0
Feb 6 21:46:45 ldap slapd[25830]: conn=10 op=0 BIND
dn="CN=MANAGER,O=TEST,C=ID" method=128
Feb 6 21:46:45 ldap slapd[23268]: conn=9 op=-1 fd=7 closed errno=0
Feb 6 21:46:45 ldap slapd[25830]: conn=10 op=0 RESULT err=0 tag=97 nentries=0
Feb 6 21:46:45 ldap slapd[25831]: conn=9 op=5 UNBIND
Feb 6 21:46:45 ldap slapd[25832]: conn=10 op=1 SRCH base="O=TEST,C=ID"
scope=2 filter="(cn=DOUG TEST*)"
Feb 6 21:46:45 ldap slapd[25832]: conn=10 op=1 RESULT err=0 tag=101
nentries=1
Feb 6 21:46:45 ldap slapd[25833]: conn=10 op=2 SRCH base="O=TEST,C=ID"
scope=2 filter="(cn=DOUG TEST*)"
Feb 6 21:46:45 ldap slapd[23268]: conn=10 op=-1 fd=11 closed errno=0
Feb 6 21:46:45 ldap slapd[25833]: conn=10 op=2 RESULT err=0 tag=101
nentries=1
Feb 6 21:46:45 ldap slapd[25834]: conn=10 op=3 UNBIND
At conn=9, I do a bind to myself sucessfully, meaning my password is
compared OK to the record. If you look at conn=10, you can see that I bind
with dn manager, 1 entry resulted from search, but no modify at all.
Probably something simple that I miss? Thanks for your response, hope more
is coming.
***************************************************************************
Thanks and regards,
Andang Nugroho
"Courtesy comes by default, but respect I gotta earn"
***************************************************************************