You log into the Magento 2 admin panel and you are welcomed with “It’s time to change your password.”
This can be very annoying in a development environment or on a demo server, and basically it’s like a DOS attack on the admin as you are prevented from accessing the dashboard.
Security is a good thing so to quick fix this let’s just do the following:
NOT recommended on a PRODUCTION environment!
From CLI access MySQL. This will differ depending on your set up. E.g LAMP/LEMP or AWS RDS LAP/LEP
For this example, I’ll be using a LAMP.
mysql -u {username} -p
use magento
INSERT INTO `core_config_data` SET `value` = '0', `path` = 'admin/security/password_is_forced';
Exit
Then proceed to flush the Magento’s cache.
cd /var/www/magento
sudo php bin/magento cache:flush
sudo redis-cli flushall
#If using Redis.
Dashboard is now accessible!
Good to go 😀