Purpose
This statement is used to add, modify, or drop password management parameters in a profile.
Note
The changes made by using the ALTER PROFILE statement in a profile affect only the users in subsequent sessions and do not affect the user in the current session.
Syntax
ALTER PROFILE "profile_name"
LIMIT
{
FAILED_LOGIN_ATTEMPTS integer | UNLIMITED | DEFAULT
| PASSWORD_LIFE_TIME integer | UNLIMITED | DEFAULT
| PASSWORD_LOCK_TIME integer | UNLIMITED | DEFAULT
| PASSWORD_VERIFY_FUNCTION function_name | NULL | DEFAULT
| PASSWORD_GRACE_TIME integer | UNLIMITED | DEFAULT
| PASSWORD_ROLLOVER_TIME bigint(20) | UNLIMITED | DEFAULT
};
Parameters
Parameter |
Description |
|---|---|
| profile_name | The name of the profile to be modified. |
| FAILED_LOGIN_ATTEMPTS | The number of consecutive failed login attempts allowed for a user in the profile. |
| PASSWORD_LOCK_TIME | The number of days that a locked account specified in the profile remains locked after it has been locked. |
| PASSWORD_LIFE_TIME | The number of days that a password specified in the profile remains valid. |
| PASSWORD_GRACE_TIME | The number of days during which a user in the profile is allowed to log in after a password warning is issued. |
| PASSWORD_VERIFY_FUNCTION | The name of the function that verifies a password. |
| PASSWORD_ROLLOVER_TIME | The number of days that a password is valid after it is rolled over. During the rollover period, both the old and new passwords can be used for authentication. A value of 0 disables old password authentication.
NoteThis parameter is supported starting from V4.4.2 BP1. Starting from V4.4.2 BP4, the following rules are applied to validate the parameter values: if the value is not 0, it must be within the range of 10 seconds to 60 days, and cannot be greater than |
| integer | The specified parameter is set to an integer value. |
| UNLIMITED | No restriction is set on the specified parameter. |
| DEFAULT | The default value is used for the specified parameter. |
| function_name | The name of the function that verifies a password. |
| NULL | No verification function is used. |
Examples
Set the
FAILED_LOGIN_ATTEMPTSparameter to5and thePASSWORD_LOCK_TIMEparameter to1for theprofile1profile.obclient> ALTER PROFILE "profile1" LIMIT FAILED_LOGIN_ATTEMPTS 5 PASSWORD_LOCK_TIME 1;Set the
PASSWORD_LIFE_TIMEparameter to90and thePASSWORD_GRACE_TIMEparameter to5for theprofile2profile.obclient> ALTER PROFILE "profile2" LIMIT PASSWORD_LIFE_TIME 90 PASSWORD_GRACE_TIME 5;Change the password rollover time: Set the
PASSWORD_ROLLOVER_TIMEparameter in theprofile3profile to5days (example value).obclient> ALTER PROFILE "profile3" LIMIT PASSWORD_ROLLOVER_TIME 5;