Oracle user management

Source: Internet
Author: User

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];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.