Legacy Knowledge Base
Published Jul. 2, 2025

Reset the admin user password

Written By

Thanga Meena

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • How to reset the admin password?

Environment

  • Liferay DXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • Using " Forgot Password" in the "Sign in" portlet
    • Note: Please make sure the admin user email id should be valid to receive the email and also the outgoing SMTP should be properly configured to send the password reset link details to the registered email id. Along with that, you have to answer the security questions.
  • Workaround:
    • Case 1: When the SMTP is not working / you have not provided the valid email id for the admin user, a notification mail will not be sent to reset the password for the admin or non-admin users. 
      • Shutdown the server
      • Set setup.wizard.enabled=true in portal-ext.properties or use portal-setup-wizard.properties.
      • Start the server and follow the wizard steps.
      • Shutdown the server again.
      • Set setup.wizard.enabled=false or delete the portal-setup-wizard.properties from the bundle
        • Note: This is a workaround and this is not the recommended way or an approach to be followed.
      • Start the server and reset the password as instructed. 
    • Case 2: To reset for the portal administrator whose credentials has created with the basic configuration of the setup wizard when you have started the server
      • Take the backup of portal-setup-wizard.properties and rename it or delete it.
      • Delete the temp directories
      • Setting setup.wizard.enabled=false bypasses launching the Setup Wizard. So, please ensure this has not been disabled to skip the basic configuration wizard with the server startup. For your reference, Liferay enabled this property as true by default.
      • Start the server
      • This will allow you to create a new user and the password can be set at this point for this user which will be created as admin by default. 
      • Using this admin user, you can reset the password for the other admin if any or non-admin user
        • Notes: When deleting the portal-setup-wizard.properties, it will not change or update the existing user password. Instead of that, It will allow creating a new user or dummy user with admin privilege
    • Case 3: to reset for the normal user, the portal administrator can change those user's passwords manually over the control panel.  
    • Case 4: to reset for the admin user who has created as a new user and granted the admin privilege. In this case, this admin user details have not been configured in the portal-setup-wizard.properties, and deleting it would not be helpful here.
      • For this, you can follow case 1 to reset the password for the other portal administrator.
  • Workaround modifying the database data:
    • Important: It is not recommended to directly modify the database data. This should only be done as the last alternative.
    • To reset the admin user password you can execute following SQL update: 
      • update User_ set password_='<<new password>>', passwordEncrypted='0' where screenName='<<user screenName>>';
      • Note: Replace 'new password' with the new password you want to set and 'user screenName' with the admin user screen name

The above steps are the workaround and not the recommended approaches. To avoid such situations in the future, enable SMTP with valid email credentials.

Did this article resolve your issue ?

Legacy Knowledge Base