Symptom
In ODC V3.1.1 and earlier versions, users register accounts by themselves. The password cannot be retrieved or reset after it is forgotten.
Note
- We recommend that you upgrade ODC to V3.2.0 or later. ODC V3.2.0 allows the administrator to reset the logon password of an ordinary user on the User Management page in the public resource console. In this case, do not use the solution described in this topic.
- For more information about how to reset a password in ODC V2.4.1 to V3.1.3, see How do I reset a password in ODC V2.4.1 to V3.1.3.
- For more information about how to reset a password in ODC V2.4.0 or earlier, see How do I reset a password in ODC V2.4.0 or earlier.
Possible causes
ODC V3.1.1 and earlier versions do not have the administrator role and do not provide the password reset and retrieval feature.
Affected versions
ODC V2.4.1 to V3.1.3
Solutions
Connect to ODC MetaDB and modify the password field in the user table to reset the password.
ODC V2.4.1 and later use the Bcrypt algorithm to encrypt account passwords. Before you modify an account password in ODC MetaDB, generate the Bcrypt value of the password first.
Notice
In ODC V2.4.1 and later versions, the ODC user password is used to encrypt the database connection password. If you reset the password by modifying ODC MetaDB, the database connection password of the user becomes unavailable. In this case, you must reconfigure the database connection password before using it.
Step 1: Generate the Bcrypt value of the password
# You can run the `htpasswd` command to generate a Bcrypt-encrypted password.
# The following command generates the BCrypt value of the password `123456`, where the username can be any string.
htpasswd -bBn -C 10 username 123456
# In the following example, you can copy the string after `username:`.
# username:$2y$10$PHcT2yHCkaqwlfb7ZjXk5uzX5oRvvuMRrrBJfKwfdRfhMeYTU7WkK
If your local server does not support the htpasswd command, you can generate Bcrypt values by using some online tools, such as bcrypt.org.

Step 2: Modify the password field in the user table
-- Use the bcrypt value generated in step 1 to modify the password field of the admin account in the `iam_user` table.
update iam_user set `password`='your bcrypted password value'
where account_name='admin';
Step 3: Set an empty database connection password for the user
Note
If you do not perform this step, a decryption failure is reported for the query, and the password cannot be changed.
-- Set an empty database connection password.
UPDATE connect_connection SET is_password_saved = 0 , `password` = NULL , sys_tenant_password = NULL
WHERE owner_id IN (SELECT `id` FROM iam_user WHERE account_name = 'admin')
AND visible_scope = 'PRIVATE';
Step 4: Edit each connection on the homepage and reconfigure the connection password
After the admin account logs in to ODC with the new password, reconfigure the connection password in the personal connection list on the ODC homepage.
As shown in the following figure, click Change Password and select the Save Password checkbox to save the connection.