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. |