Changing the administrative user's password

If you are the OFBiz administrator and you forget this user's password, you could be out of luck since the administrator (the "admin" user login) has all the privileges necessary to perform any OFBiz task, including logging in and assigning the admin user a new password.

If you find yourself in this situation, there is no easy way to retrieve this password such that you may use it to log in. The only solution to this problem is to reset the password by directly manipulating the correct entity in the database, or let OFBiz do that for you using the following recipe.

Getting ready

Before following this recipe, ensure these steps are performed:

  1. Navigate to the OFBiz install directory.
  2. Open a command line or console window.
  3. If you are running OFBiz, it is best to stop it at this time.

How to do it...

To reset the admin password, follow these steps:

  1. From the OFBiz install directory, run the following command:
    ant load-admin-user-login -DuserLoginId=admin
    
  2. Restart OFBiz.
  3. Log in to OFBiz as the admin user where the login user name is "admin" and the password is "ofbiz".
  4. When prompted to change the admin user's password, enter the new password or "ofbiz" to maintain the existing value.

How it works...

This ant command rebuilds OFBiz and reloads the database with a single entity containing the admin user's login password of "ofbiz". It also sets a flag indicating that the next time this user logs in, they must change this password. Based on this flag setting, when next the admin user logs in, they will be prompted to change the password. At that time, the password may be reset to a new value or the "ofbiz" value can be re-entered.

There's more…

You can always change the admin password using the OFBiz Party Manager application, assuming you can log in as "admin". In fact, that is the preferred method. This recipe is intended to be used in those situations where the admin user cannot log in to access the Party Manager. As such, ensure that access to this ANT script is well protected from malicious use.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.239.41