Help Center/ GaussDB/ FAQs/ Database Parameter Modification/ How Do I Set the Automatic Unlocking Time After an Account Is Locked in GaussDB?
Updated on 2024-09-13 GMT+08:00

How Do I Set the Automatic Unlocking Time After an Account Is Locked in GaussDB?

The password_lock_time parameter specifies the duration before a locked account is automatically unlocked, in days. The value is a floating-point number ranging from 0 to 365. The value 0 indicates that the account is unlocked immediately. The integral part of the parameter value indicates the number of days and its decimal part can be converted into hours, minutes, and seconds. For example, if password_lock_time is set to 1.5, the duration is one day and 12 hours.

You can set the automatic account unlocking time on the GaussDB console. Specifically, perform the following operations:

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. On the Instances page, click the name of the target instance to go to the Basic Information page.
  5. In the navigation pane on the left, choose Parameters.
  6. Search for the password_lock_time parameter in the search box.
  7. Change the parameter value and click Save. The value ranges from 0 to 365.
  8. In the displayed dialog box, click OK.

The locking and unlocking functions take effect only when the values of both password_lock_time and failed_login_attempts are positive numbers. failed_login_attempts specifies the maximum number of incorrect password attempts before an account is locked. For details, see How Do I Set the Maximum Number of Failed Login Attempts for Accounts in GaussDB?