用戶口令管理(profile)

profile 是口令限制、資源限制的命令集合,當建立數據庫時,oracle會自動建立名稱爲default的profile;當建立的用戶沒有指定profile選項,那oracle就會將default分配給用戶

 

1.賬戶鎖定

指定該賬戶登錄時最多輸入密碼的次數,也可以指定用戶鎖定的時間(單位是天)

比如:指定tea這個用戶最多隻能嘗試3次登錄,鎖定時間爲2天

create profile my_profile  limit  failed_login_attemps 3  password_lock_time  2

alter user tea profile  my_profile

 

2.給賬戶解鎖

alter user tea account unlock

 

3.終止口令

爲了讓用戶定期修改密碼可以使用終止口令的指令來完成,同樣這個命令也需要dba身份來操作

比如:給tea用戶創建一個profile,要求用戶每隔10天要修改登錄密碼,寬限期爲2天

create profile my_profile  limit  password_life_time 10 password_grace_time  2;

alter user tea profile  my_profile

 

 

4.口令歷史:即在一定的時間內密碼不能重複

create  profile  my_profile  limit  password_reuse_time  10;

alter  user tea profile my_profile;

 

5.刪除profile

當不需要某個profile文件時,可以刪除該文件(該文件刪除後,相應的用戶就不會受到限制了)

drop profile  my_profile  [cascade]

當profile作用於某一用戶上時,必須指定cascade才能刪除

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章