I recently changed something that caused my login LDAP connection to fail. I know how to fix it but when I try to log back in as admin to fix it I get the error message "Failed to bind to ldap server".
As I understand it the LDAP module should still default to "normal" login conventions when you try to login as user 1, which is why this is so frustrating.
Background/Stack:
Client = Drupal 7.54 (I am able to see and manipulate the filesystem of the project)
Webserver = Apache/2.4.6 (Red Hat Enterprise Linux)
OS: Red Hat Enterprise Linux Server release 7.4 (Maipo) (sudo access)
Database = 5.5.56-MariaDB MariaDB Server (can execute commands)
PHP Version: PHP 5.4.16 (cli)
Clean URLS: Enabled
Theme: Custom Bootstrap
Browsers: Chrome, Safari, Firefox
Things I have tried:
- clean_domain_name.org/?q=user --> takes me to a login page, wherein the above issue is occurring. The project is themed such that the login bar is visible in the top right on any other part of the site.
- clean_domain_name.org/q=user/password --> "You are not authorized to access this page."
- resetting the admin password with a sql-query: I successfully run the query on the database associated with the site, and receive the same "Failed to bind" error message when I try to login with the new password.
- resetting the admin password with a php file: clean_domain_name/filename.php?pass=mypass --> browser displays php file in plaintext. The php file has chmod 755 set and has the same owner and belongs to the same group as index.php (which does work).
Since I still can't log in even after changing the password with a sql-query, I think that Drupal is interpreting my login attempt as an attempt to bind with LDAP credentials, which doesn't seem right.
If anyone has any ideas as to why that might be the case or how to successfully log back into the admin account I would be extremely grateful.
Comments
database changed
Hi,
I was also locked out of Drupal (8.4.5) when trying to configure LDAP.
I found that a couple of database changes took place after installing the LDAP module and its dependencies.
It's better to revert the database to the version you had before activating and configuring these modules. (Hope you made a backup before starting to activate and configure LDAP).
Your admin password should
Your admin password should work based on whatever you had set via DB. I remember there was one setting which allows you to specify authentication chain so if your LDAP login is failed it could fallbak to native authentication