Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are many methods to recover admin password described here https://www.drupal.org/node/44164 but this method gives you a admin panel to recover admin username and password.
This gives easy access and UI to generate admin password. This will let you know what is the current admin username in system.
If you have installed or modified a theme that just breaks everything, or you've deleted the current theme without disabling it first, try these steps to get back to a working interface.
There are several methods to recover the Drupal administrator ("user 1") password. DrupalConsole and drush provide commands to recover and manage users passwords. If you do not use DrupalConsole or drush you can recover the password via mail.
Recover password with DrupalConsole
DrupalConsole offers several ways of recovering the administrator's password.