R
R
Roman Khodakovsky2018-05-30 10:44:35
MySQL
Roman Khodakovsky, 2018-05-30 10:44:35

How to disable recapcha on a website (Drupal 7) via DB?

The task was to transfer the site to a new hosting and domain. The administrator password has been lost.
The site has been moved, everything works, but in order to restore the admin password, you need to go through the captcha, but the API key does not fit, which is logical, since the domain is new. I need to somehow disable the captcha or change the key without having access to the admin panel.
I found in the system table where the module parameters are most likely stored, but I don’t understand how they can be edited, since they are in the blob
. There are accesses to FTP and MySQL. What ideas might there be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
andead, 2018-05-30
@andead

UPDATE system
SET status = 0
WHERE filename = 'sites/all/modules/recaptcha/recaptcha.module';

TRUNCATE cache;
TRUNCATE cache_bootstrap;

N
Nikolay, 2018-05-30
@iNickolay

1. Create a script in the site root that will call the user_hash_password function to generate a password hash.
Below is an example of the contents of the script.

<?php
    define('DRUPAL_ROOT', getcwd());
    require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
    require_once DRUPAL_ROOT . '/includes/password.inc';
    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
    echo user_hash_password('ВАШ_ПАРОЛЬ');
    die();

After executing the script, you will receive a password hash string, for example:
Use this line in your database query:
UPDATE users
    SETpass = '$S$DMzbGJybGry6UAjAcC9nMMnZrbIT4sTsI7XigxY/SyXUOlsIaTek'
    WHERE uid = 1

(c) Second link in Google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question