Oracle Management Security and Resources (ii) Use Oracle profile to manage passwords

Source: Internet
Author: User

1. Account Lockout

Failed_login_attempts: Used to specify the maximum number of failed consecutive logons.

Password_lock_time: Used to specify the number of days the account is locked.

03:34:13 sql> Create profile Lock_account limit

03:36:51 2 failed_login_attempts 3

03:37:07 3 Password_lock_time 10;

Profile created.

02:56:45 sql> Select Profile, resource_name, limit from dba_profiles

02:57:20 2 where profile= ' Lock_account ';

Profile Resource_name LIMIT

------------------------------ -------------------------------- ----------------------------------------

Lock_account Composite_limit DEFAULT

Lock_account Sessions_per_user DEFAULT

Lock_account cpu_per_session DEFAULT

Lock_account Cpu_per_call DEFAULT

Lock_account logical_reads_per_session DEFAULT

Lock_account Logical_reads_per_call DEFAULT

Lock_account Idle_time DEFAULT

Lock_account Connect_time DEFAULT

Lock_account PRIVATE_SGA DEFAULT

Lock_account failed_login_attempts 3

Lock_account Password_life_time DEFAULT

Lock_account Password_reuse_time DEFAULT

Lock_account Password_reuse_max DEFAULT

Lock_account password_verify_function DEFAULT

Lock_account Password_lock_time. 0006

Lock_account Password_grace_time DEFAULT

Rows selected.

03:38:02 sql> Create user test identified by test;

User created.

03:38:11 sql> alter user test profile Lock_account;

User Altered

02:59:09 sql> SELECT username,profile from Dba_users

02:59:18 2 WHERE username= ' TEST ';

USERNAME profile

------------------------------ ------------------------------

TEST Lock_account

03:38:31 sql> Select Username,account_status from Dba_users

03:39:23 2 where username= ' TEST ';

USERNAME Account_status

------------------------------ --------------------------------

TEST OPEN

03:40:00 sql> CONN test/123

ERROR:

Ora-01017:invalid Username/password; Logon denied

Warning:you are no longer connected to ORACLE.

03:40:03 sql> CONN test/123

ERROR:

Ora-01017:invalid Username/password; Logon denied

03:40:06 sql> CONN test/123

ERROR:

Ora-01017:invalid Username/password; Logon denied

03:40:07 sql> CONN test/123

ERROR:

Ora-28000:the account is locked

03:40:23 sql> Conn/as SYSDBA

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.