Profile_oracle setting a User Password Never Expires
Setting a user password in oracle never expires
Set the password for the ETL_TEST user to never expire.
Select * from dba_users where username = 'etl _ test ';
View the dba_users dictionary to know that the ETL_TEST user will expire on March 13, November 23, 2015.
Select username, user_id, account_status, expiry_date, profile from dba_users where username = 'etl _ test ';
The profile parameter is default.
SELECT username, profile from dba_users where username = 'etl _ test ';
The profile parameter is default, and the password is valid for a long time, as shown below:
SELECT * FROM dba_profiles s WHERE s. profile = 'default' AND resource_name = 'password _ LIFE_TIME ';
As you can see, set profile to default and set password to 180 days after expiration.
We can create a profile file for a user.
Create a profile file named passwd_unlimit and set the password under its profile to never expire.
Create profile passwd_unlimit limit PASSWORD_LIFE_TIME unlimited;
Set the initialization parameter of passwd_unlimit to the ETL_TEST user. As follows:
Alter user ETL_TEST profile passwd_unlimit;
After the configuration is complete, run dba_users to check whether the profile file of ETL_TEST is successfully set, as shown below:
Select username, user_id, account_status, expiry_date, profilefrom dba_users where username = 'etl _ test ';
You can see that the profile file of ETL_TEST is set to passwd_unlimit, while the profile file of passwd_unlimit is set to the password never expires.
Finally, let's check which resource settings attached to the profile file named PASSWD_UNLIMIT are as follows:
SELECT * FROM dba_profiles s WHERE s. profile = 'passwd _ UNLIMIT ';
We can see that PASSWORD_LIFE_TIME is indeed set to UNLIMITED.
So far, we have achieved the goal that the ETL_TEST user password will never expire.
In addition, other resources are not set in the profile file named PASSWD_UNLIMIT. We need to adjust other resources to meet the requirements.
For example, I subsequently executed the following settings:
ALTER profile passwd_unlimit limit COMPOSITE_LIMIT UNLIMITED;
ALTER profile passwd_unlimit limit SESSIONS_PER_USER UNLIMITED;
ALTER profile passwd_unlimit limit CPU_PER_SESSION UNLIMITED;
ALTER profile passwd_unlimit limit CPU_PER_CALL UNLIMITED;
ALTER profile passwd_unlimit limit LOGICAL_READS_PER_SESSIONUNLIMITED;
ALTER profile passwd_unlimit limit LOGICAL_READS_PER_CALL UNLIMITED;
ALTER profile passwd_unlimit limit IDLE_TIME UNLIMITED;
ALTER profile passwd_unlimit limit CONNECT_TIME UNLIMITED;
ALTER profile passwd_unlimit limit PRIVATE_SGA UNLIMITED;
ALTER profile passwd_unlimit limit FAILED_LOGIN_ATTEMPTS 10;
ALTER profile passwd_unlimit limit PASSWORD_REUSE_TIME UNLIMITED;
ALTER profile passwd_unlimit limit PASSWORD_REUSE_MAX UNLIMITED;
ALTER profile passwd_unlimit limit PASSWORD_VERIFY_FUNCTION NULL;
ALTER profile passwd_unlimit limit PASSWORD_LOCK_TIME 1;
ALTER profile passwd_unlimit limit PASSWORD_GRACE_TIME 7;
Let's take a look at the affiliated resource settings under the profile file named PASSWD_UNLIMIT, as follows:
So far, each resource in the profile file of PASSWD_UNLIMIT is configured to meet the needs of this user.
Summary:
1. syntax for creating a profile:
Create profile [PROFILE] limit [RESOURCE_TYPE] [LIMIT];
Example: create profile passwd_unlimit limit PASSWORD_LIFE_TIME unlimited;
2. Change the profile Syntax:
Alter user [user] profile [profile];
Example: alter user ETL_TEST profile passwd_unlimit;
3. Change the configuration Syntax of a source in a profile:
ALTER profile [profile] limit [source] [option];
Example: ALTER profile passwd_unlimitlimit COMPOSITE_LIMIT UNLIMITED;