oracle

关注公众号 jb51net

关闭
首页 > 数据库 > oracle > oracle11g密码复杂性校验开启关闭

oracle11g密码复杂性校验开启关闭方式

作者:脑子进水养啥鱼?

这篇文章主要介绍了oracle11g密码复杂性校验开启关闭方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教

oracle11g密码复杂性校验开启关闭

oracle11g密码复杂性校验由参数PASSWORD_VERIFY_FUNCTION控制

开启密码复杂性校验

SQL> @?/rdbms/admin/utlpwdmg.sql
Function created.
Grant succeeded.
Profile altered.
Function created.
Grant succeeded.

SELECT * FROM Dba_Profiles d WHERE d.profile='DEFAULT';
SQL> alter user syd identified by syd;
alter user syd identified by syd
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20001: Password length less than 8
SQL> alter user syd identified by Sydoracle123;
User altered.
SQL> alter user syd identified by syd;
alter user syd identified by syd
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20001: Password length less than 8

关闭密码复杂性校验

SQL> alter profile default limit PASSWORD_VERIFY_FUNCTION null;
Profile altered.

SELECT * FROM Dba_Profiles d WHERE d.profile='DEFAULT';
SQL> alter user syd identified by syd;
User altered.
SQL> alter user syd identified by oracle;
User altered.

utlpwdmg.sql脚本中有如下一段内容:

ALTER PROFILE DEFAULT LIMIT
PASSWORD_LIFE_TIME 180
PASSWORD_GRACE_TIME 7
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LOCK_TIME 1
PASSWORD_VERIFY_FUNCTION verify_function_11G;

运行了以上脚本后,在开启了密码校验性的同时,oracle密码期限也被改回了默认的180天,若需要密码不过期别忘更改:

SQL> alter profile default limit PASSWORD_LIFE_TIME unlimited;
Profile altered.

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

您可能感兴趣的文章:
阅读全文