Overview: profile is a set of commands for password and resource restrictions. When a database is created, Oracle automatically creates a profile named default. When the created user does not specify the profile option, oracle will automatically allocate the default value to the user.
(1) account locking
Overview: specify the maximum number of times a user can enter a password when logging on to the account, or specify the time (days) for the user to be locked. Generally, the password is executed as a DBA.
Example: If Scott is specified, the user can only try three logon attempts. The lock time is two days. How can this problem be solved?
1. Create a profile file
Create ProfileLock-accountLimit failed_login_attempts3Password_lock_time2;
2. Specify the created profile to the user.
Alter userLidaProfileLock_account;
(2) Unlock an account (User)
Alter userLidaAccount unlock;
(3) Termination Password
In order to allow users to regularly change their passwords, they can use the command to terminate the passwords. Similarly, this command also requires DBA identity.
Example: create a profile file for the previously created user Lida, requiring the user to change his login password every 10 days. The grace period is 2 days. What should I do?
Create ProfileMyprofileLimit passoword_life_time10Password_grace_time2;
Alter userLidaProfileMyprofile;
(4) Password History
Overview: If you want to change the password without using the previous password, you can use the password history, so that Oracle will store the password modification information in the data dictionary, in this way, Oracle will compare the old and new passwords when the user changes the password. When the old and new passwords are the same, it will prompt the user to re-enter the password.
Create ProfilePassword_historyLimit password_life_time10Password_grace_time2Password_reuse_time10;
Alter user Lida ProfilePassword_history; // The password can be reused after 10 days.
(5) delete a profile
Drop ProfilePassword_history[Cascade];