You can use the ALTER USER or SET PASSWORD statement to change the password of a user.
Change the password of a user by using the ALTER USER statement
You can execute the ALTER USER statement to change the passwords of other users. To execute this statement, you must have the UPDATE USER privilege.
For information about how to view your privileges, see View user privileges. If you do not have the UPDATE USER privilege, contact an administrator. For more information, see Modify user privileges.
The syntax is as follows:
obclient>ALTER USER username IDENTIFIED BY password;
For example, change the password of sqluser01 to ******.
obclient> ALTER USER sqluser01 IDENTIFIED BY ******;
For more information about the ALTER USER statement, see ALTER USER.
Change the password of a user by using the SET PASSWORD statement
You can execute the SET PASSWORD statement to change your password or the passwords of other users.
The syntax is as follows:
obclient> SET PASSWORD [FOR user] = PASSWORD('password');
Some notes about this:
If the
FOR userclause is absent, this statement changes the password of the current user. Any logged-on user can change their password.If the
FOR userclause is specified, this statement changes the password of the specified user. To change the password of a specified user, you must have the globalCREATE USERprivilege.For information about how to view your privileges, see View user privileges. If you do not have the global
CREATE USERprivilege, contact an administrator. For more information, see Modify user privileges.
For example, change the password of sqluser01 to ******.
obclient> SET PASSWORD FOR sqluser01 = password('******');
Query OK, 0 rows affected
For more information about the SET PASSWORD statement, see SET PASSWORD.
Change the password of a user in the OCP console
Before you change the password of a tenant user, ensure that you have the privileges to modify the tenant.
Prerequisites
You have permissions of the TENANT_MANAGER role. Otherwise, request the OCP administrator to assign the role. For more information, see "Edit a user" in the OCP User Guide of the corresponding version.
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the tenant list, find the target tenant to which the user belongs and click the tenant name. Then, the Overview page appears.
In the left-side navigation pane, click User Management.
In the user list, find the user whose password is to be changed. In the Actions column, click Change Password.

In the dialog box that appears, enter the new password and confirm it, and then click OK.