[GH-ISSUE #251] Admin password cannot be changed from admin@123 #180

Closed
opened 2026-03-02 15:56:32 +03:00 by kerem · 6 comments
Owner

Originally created by @kiwiheretic on GitHub (Nov 4, 2019).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/251

I've changed the admin password but it will still only log in with admin@123.

From the file I changed....

// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', //admin@123 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345 );

I've cleared cookies and also restarted nginx and php7.2-fpm. Any other reason why password refuses to change?

Originally created by @kiwiheretic on GitHub (Nov 4, 2019). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/251 I've changed the admin password but it will still only log in with admin@123. From the file I changed.... `// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', //admin@123 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345 ); ` I've cleared cookies and also restarted nginx and php7.2-fpm. Any other reason why password refuses to change?
kerem 2026-03-02 15:56:32 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@prasathmani commented on GitHub (Nov 4, 2019):

first generate the new password from here, then replace the password of admin $2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW to your new password

<!-- gh-comment-id:549305930 --> @prasathmani commented on GitHub (Nov 4, 2019): first generate the new password from [here](https://tinyfilemanager.github.io/docs/pwd.html), then replace the password of admin `$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW` to `your new password`
Author
Owner

@prasathmani commented on GitHub (Nov 12, 2019):

hope your query is resolved, closing this ticket

<!-- gh-comment-id:552735707 --> @prasathmani commented on GitHub (Nov 12, 2019): hope your query is resolved, closing this ticket
Author
Owner

@benjamin74 commented on GitHub (Sep 8, 2020):

Hello,

I have the exact same issue.

Let's say I want to have : "mickey" and password "donaldduck", I've set this using the generator:

$auth_users = array(
'mickey' => '$2y$10$jKnX/tGRXChevqpZv5lrR.XW4mvLDWCFpj1goYkWcyo3bu56XmDw.'
);

restarted nginx and php to avoid any cache issue.

Yet the new username and password do not work, it still says "Login failed. Invalid username or password"

I'm totally clueless as to what is happening here. Using PHP 7.4.2.

Using this code here doesn't work either:

$auth_users = array(
'mickey' => password_hash('donaldduck', PASSWORD_DEFAULT)
);

<!-- gh-comment-id:689050850 --> @benjamin74 commented on GitHub (Sep 8, 2020): Hello, I have the exact same issue. Let's say I want to have : "mickey" and password "donaldduck", I've set this using the [generator](https://tinyfilemanager.github.io/docs/pwd.html): $auth_users = array( 'mickey' => '$2y$10$jKnX/tGRXChevqpZv5lrR.XW4mvLDWCFpj1goYkWcyo3bu56XmDw.' ); restarted nginx and php to avoid any cache issue. Yet the new username and password **do not work**, it still says "Login failed. Invalid username or password" I'm totally clueless as to what is happening here. Using PHP 7.4.2. Using this code here doesn't work either: $auth_users = array( 'mickey' => password_hash('donaldduck', PASSWORD_DEFAULT) );
Author
Owner

@benjamin74 commented on GitHub (Sep 8, 2020):

OMG, the documentation is fairly unclear.

It says we can name "tinyfilemanager.php" whatever we want and 2 lines after that it says to change the "$auth_users"...

So of course I was making this change in the tinyfilemanager.php, whereas it should be made INSIDE the config.php file!!

<!-- gh-comment-id:689058306 --> @benjamin74 commented on GitHub (Sep 8, 2020): OMG, the documentation is fairly unclear. It says we can name "tinyfilemanager.php" whatever we want and 2 lines after that it says to change the "$auth_users"... So of course I was making this change in the tinyfilemanager.php, whereas it should be made INSIDE the config.php file!!
Author
Owner

@kiwiheretic commented on GitHub (Oct 3, 2020):

Thanks for that @benjamin74 . Will have that a whirl

<!-- gh-comment-id:703016675 --> @kiwiheretic commented on GitHub (Oct 3, 2020): Thanks for that @benjamin74 . Will have that a whirl
Author
Owner

@Bubalubs commented on GitHub (Dec 10, 2020):

I solved this in a different way as if your PHP is using OPcache like mine you will need to restart php-fpm or whatever to clear the cache for the updates to config.php to take effect.

Just in case this will help anyone else too.

<!-- gh-comment-id:742507778 --> @Bubalubs commented on GitHub (Dec 10, 2020): I solved this in a different way as if your PHP is using OPcache like mine you will need to restart php-fpm or whatever to clear the cache for the updates to config.php to take effect. Just in case this will help anyone else too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#180
No description provided.