LDAP Error

LDAP Error

by m question -
Number of replies: 3

Hi,

I am trying to use LDAP authentication plugin, it worked & it create users. in Settings I select  that users can change thier password, I understand that password thay allowed to change are ones stored in LDAP server.


when users log in & change password, they get follwoing  error

Debug info: Error code: errorpasswordupdate.

Stack trace:
line 463 of \lib\setuplib.php: moodle_exception thrown
line 115 of \login\change_password.php: call to print_error()


the following error in (from php log)

[AUTH LDAP] Error in user_update_password(). Error code: 53; Error string: Server is unwilling to perform

I need help to understand what the errors mean and how to correct it.

the user for binding has no privleges to change the password & I am not sure if it has LDAPS connection


(MS Active Directory, Moodle 2.7, WAMP Server).

Thank You,

Average of ratings: -
In reply to m question

Re: LDAP Error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I would check that your bind user has the correct permissions on the AD.  It could be that that user only has read permissions and not write permissions.

In reply to m question

Re: LDAP Error

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Unfortunately you need to be using LDAPS (otherwise Active Directory doesn't let you change any value, much less passwords), and the Moodle bind user needs to have the privilege to change other users' passwords.

This last requirement was a limitation of the way PHP LDAP module did some operations. Starting with PHP 5.6.0 they have implemented ldap_modify_batch (which I have just seen it's been backported to PHP 5.4.26 to 5.5.10). This new feature allows[1] for the users to change their own passwords, without needing special privileges for the bind user. But you would still need LDAPS.

[1] Of course, all the code needed to implement this in Moodle has to be written, but the missing PHP functionality is at least there.

Saludos.
Iñaki.