[Fedora-directory-users] changing password

Maurizio Marini maumar at cost.it
Tue May 29 10:08:34 UTC 2007


Hi there
this is a very beginner question, sorry if already answered (i didn't find it 
goggling)

i hame trying to change password using a very base php script, binding with 
user credentials and next to modify password; i get always error for having 
no enough rights to do it:
Warning: ldap_mod_replace() [function.ldap-mod-replace]: Modify: Insufficient 
access in change_password.php on line ...

i bind using user dn and password

$ldapServer = '192.168.1.1';
$ldapBase = 'dc=example,dc=com';
$ldapDn = 'uid';
$ldapUid = 'ttest';
$ldapOU = 'ou=People';
$ldaprdn  = $ldapDn . '=' . $ldapUid . ',' . $ldapOU . ',' . $ldapBase;
$ldappass = 'password';
$ldapConn = ldap_connect($ldapServer);
$ldapBind = ldap_bind($ldapConn,$ldaprdn,$ldappass);
ldap_set_option($ldapConn, LDAP_OPT_PROTOCOL_VERSION, 3);
$entry['password'] ='test'; 
$result = ldap_mod_replace($ldapConn, $ldaprdn, $entry );
if ($result) echo "Password changed!" ;else echo "There was a problem!";


what i think, is that i miss something like this:

access to attr=userPassword
        by self write
        by anonymous auth
        by * none

should i insert an aci like this?
some insight or suggestion?
tia
        Maurizio




More information about the Fedora-directory-users mailing list