This topic describes how to reset the logon password for an RDS Custom instance if you forgot the password or did not set one during creation.
Procedure
|
Method |
Instance restart required |
Instance logon required |
Instance status |
|
Yes |
No |
Running |
|
|
No |
Yes |
Running |
Method 1: Reset password in the console
-
Log on to the RDS console. In the left-side navigation pane, click RDS Custom > Custom Instances. In the top navigation bar, select a region.
-
Click the instance ID to open the instance details page.
-
On the Basic Information page, in the Other Information section, click Reset Password.
-
In the Reset Password dialog box, set a new password, and select Yes.
WarningRestarting the instance interrupts its services, which can disrupt your business. Perform this operation during off-peak hours to minimize the impact.
-
Click OK.
The password reset is complete when the instance status changes to Running.
-
(Optional) Use the new password to connect to the RDS Custom instance. For more information, see Connect to an RDS Custom instance.
Method 2: Reset password from within the instance
If you are logged in to the instance's operating system, you can change the logon password directly from the command line. The new password takes effect immediately, and you do not need to restart the instance. The following example uses the default OS image, Alibaba Cloud Linux 2.19.
-
Run the following command to change the instance logon password:
sudo passwd <username> -
Enter the new password and press the
Enterkey. -
Re-enter the new password and press the
Enterkey.The following output indicates that the password has been successfully reset.
Changing password for user root. New password: Retype new password: passwd: all authentication tokens updated successfully.