oracle通过profile限制用户的恶意登录和使用期限

用户profile口令管理

1,可以把profile想象成一个数据对象(文件,规则)

   案例:

   允许某用户,最多尝试登录3次,如3次未登录成功,则锁定该用户,锁定后两天不能登录系统

 设置语法(system用户设置)

  create  profile  profile文件名 limit failed_login_attempts 2 password_lock_time 2;

       create profile userprofile1 limit failed_login_attempts 3 password_lock_time 2;

       

  创建用户对那些用户生效呢

  alter user scott profile userprofile1;

  人为输入三次错误密码账号锁定了

  

  需要使用system用户解锁

 alter user scott account unlock;

 

用户profile口令管理(限制口令的使用期限)

案例:

对一个账户的密码做出限制,最多使用10天,宽限期为2天,到期密码必须更改

语法格式:

create profile userprofile2 limit password_life_time 10 password_grace_time 2;

指定用户生效

alter user scott profile userprofile2;

删除规则

drop profile userprofile1 cscade;

 

posted @ 2017-10-21 23:51  minseo  阅读(638)  评论(0编辑  收藏  举报