Oracle管理安全和資源(二)使用Oracle Profile管理口令

來源:互聯網
上載者:User

1、賬戶鎖定

FAILED_LOGIN_ATTEMPTS:用於指定連續登入的最大失敗次數。

PASSWORD_LOCK_TIME:用於指定賬戶被鎖定的天數。

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

16 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.