Oracle Profile概要檔案管理使用者密碼

2021-07-29 14:38:24 字數 1959 閱讀 5968

目標:1.實現使用者定期修改密碼

2.控制使用者密碼的登入出錯的次數

3.控制使用者舊密碼的生命週期

1.profile的概述

profile是oracle提供的一種針對使用者資源使用和密碼管理的策略配置。借助profile,可以實現特定使用者資源上的限制和密碼管理規則的應用。在實際的應用中,profile可以幫助我們實現很多應用層面比較困難實現的需求。

profile是oracle安全策略的乙個組成部分。

預設情況下,使用者連線資料庫,形成會話,使用cpu資源和記憶體資源是沒有限制的。在一些應用併發量很大,特別是多個應用部署在同乙個資料庫伺服器上的時候,依據應用對企業重要程度的部分,cpu和記憶體資源的分配一定是有所側重的。

此外,使用者的密碼管理,可以是乙個比較複雜的工作。比如,使用者鎖定之後,多長時間被自動釋放、密碼生命週期、登入嘗試次數等等。

這兩個方面的問題,都可以借助profile去解決。profile相當於乙個命名的安全策略集合,其中規定了資源使用的限制和密碼使用的規則。profile定義之後,是可以應用到每個使用者上,對每個使用者的安全活動進行限制。

2.案例: 指定該使用者登入時最多可以輸入3次密碼的次數,否則鎖定時間為 2天

//1.編寫profile口令:

create profile lock_account limit failed_login_attempts 3 password_lock_time 2;

----------固定 ----規則名稱 -----------------------固定 -------------固定 --至少一天 不能是小數

//2.將上面的口令應用到使用者luob上:

alter user luob profile lock_account; //將lock_account口令應用到luob上

//3.解鎖上面口令鎖定的使用者 肯定不能自己解鎖啦 用dba使用者

alter user luobing account unlock;

3.案例 採用終止口令來 讓使用者定期來定期來修改密碼 10天必須修改

//1.編寫 密碼只能使用10天的口令檔案

create profile myprofile limit password_life_time 10 password_grace_time 2;

//2.應用到luob上

alter user luob profile myprofile;

4.案例 不能使用舊密碼

//密碼 123 在修改的時候 不能重用 10天可以再用了 

create profile password_history limit password_life_time 10 password_grace_time 2 password_reuse_time 10

5.刪除 口令

drop profile password_history 【cascade】 //級聯的也會刪除(如果已經分配給使用者了,刪除後就不再有限制了。)

6.查詢 系統所有的 口令 和 當前使用者 所有的口令詳情

//1.根據使用者找到所有的口令 

select profile from dba_users where username='youruser';

//2.根據口令 查詢 口令的詳情

select * from dba_profiles where profile='low_limits';

7.修改和刪除profile

使用drop profile和alter profile語句,可以實現刪除和修改profile物件。

8.其他的說明

profile 更多》

ORACLE PROFILE 知識整理

1 配置檔案 profile 是乙個只允許具有create profile 的許可權的使用者設定口令管理和資源限制的物件。2 建立資料庫時會建立乙個預設 default 配置檔案,該檔案對所有資源不做任何限制。3 乙個使用者只能擁有1個配置檔案 4 配置檔案分兩部分,資源引數 resource pa...

Oracle profile 使用技巧

給scott使用者分配乙個profile要求如下 1 嘗試登入的次數最多4次 2 如果4次輸入錯誤,則鎖定該使用者2天 3 密碼每隔5天修改一次,寬限期為2天 答 sql conn sys orcl as sysdba sql create profile scottprofile limit fa...

Oracle Profile 配置檔案

profile是使用者的配置檔案,它是密碼限制,資源限制的命名集合。利用profile 可以對資料庫使用者進行基本的資源管理,密碼管理。1 建立profile 的語法 create profile profile test1 limit failed login attempts 3 passwor...