changing password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Fedora-directory-users mailing list
Fedora-directory-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-users

[Index of Archives]     [Fedora Directory Users]     [Fedora Directory Devel]     [Fedora Announce]     [Fedora Legacy Announce]     [Kernel]     [Fedora Legacy]     [Share Photos]     [Fedora Desktop]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux