When working with Magento 2 (now Adobe Commerce) in a development environment, one of the frustrating obstacles developers face is the mandatory password change prompt on the admin screen.
While this security measure is essential for production environments, it can be inconvenient during the development phase, where a standardized password is often used for ease of use and efficiency.
Thankfully, there is a straightforward solution to bypass this requirement and streamline your development workflow. In this article, we will guide you through the steps to disable the forced password change prompt in Magento 2.
Step 1: Disable Forced Password Change
Using the command line, navigate to your Magento 2 installation directory. Once there, enter the following command:
php bin/magento config:set admin/security/password_is_forced 0
By setting it to “0,” you effectively disable the forced password change.
Step 2: Modify Password Lifetime
In a development environment, setting it to “0” ensures that passwords do not expire.
php bin/magento config:set admin/security/password_lifetime 0
This command adjusts the password lifetime configuration and ensures that the password does not expire in the development environment.
Step 3: Verify the Changes
You should no longer be prompted to change your password, and the password lifetime will be set to “0.”
Disabling the forced password change prompt in Magento 2’s admin panel can greatly enhance the efficiency of your development workflow.
By following the simple steps outlined in this article, you can bypass this requirement and continue working with a standardized password in your development environment.
Remember, while this workaround is suitable for development purposes, it is crucial to maintain strict password security measures in production environments.