If an admin user forgets his password, he cannot retrieve it using the Management Console. In such a scenario, has to change the password by running the chpasswd script located in <PRODUCT_HOME>/bin folder on the machine that hosts the Carbon server.
Before executing this script, the Carbon instance should be shut down.
In order to change a user's password, you need to provide the following information:
The command line options available for chpasswd is as follows:
Command Line Option
The database URL
The database driver class
The username for the database
The password for the database
The username of the user whose password is to be changed.
The new password of the user whose password is to be changed.
chpasswd --db-url "jdbc:h2:$CARBON_HOME/repository/database/WSO2CARBON_DB" On Windows: chpasswd.bat --db-url "jdbc:h2:$CARBON_HOME\repsitory\database\WSO2CARBON_DB"
The following message is displayed if the password is updated successfully:
Password of user [username] updated successfully
If the database path includes directory names with spaces, the whole URL needs to be included within quotations.