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




[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux