您的位置:首页 > 数据库 > Oracle

Oracle(5)使用profile文件对口令进行管理

2017-04-01 17:54 459 查看
使用profile文件对口令进行管理,profile文件也可使用pl/sql登录system用户查看并编辑

--只允许某个用户,最多尝试登录三次,如果三次没有成功,则锁定两天,两天后才能重新登录。
create profile myprofile1 limit failed_login_attempts 3 password_lock_time 2; ----创建配置文件
alter user xiaohong profile myprofile1; ---分配配置文件
alter user xiaohong account unlock; ----给用户账号解锁
drop profile myprofile1; ---删除profile,同时解除用户的配置


---终止口令,强制用户10天换一次密码,宽限期为两天
create profile myprofile2 limit password_life_time 10 password_grace_time 2;
---修改密码时,希望用户新旧密码不一样
create profile myprofile3 limit password_life_time 10 password_grace_time 2 password_reu
se_time 1;


--如果希望删除用户,同时保留该用户的数据对象,进行的操作是:锁定用户
alter user scott account lock;
--解锁用户
alter user scott account unlock;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: