当sec_case_sensitive_logon = true后,怎么启用大小写混合的密码?
来源于:
How To Enforce Mixed Case Passwords When sec_case_sensitive_logon = true? (文档 ID 1307555.1)
适用于:
Oracle Server - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 20-SEP-2012***
目标:
在设置 sec_case_sensitive_logon = true之后,怎么为database中的user启用大小写混合的密码
解决方案:
The supplied password verify function in the file $ORACLE_HOME/rdbms/admin/utlpwdmg.sql does not enforce that the password has both upper and lower case characters. To achieve this, it is possible to modify the function as follows:
cp utlpwdmg.sql utlpwdmg_modif.sql
vi utlpwdmg_modif.sql
Add the following code:
-- Check the password uses mixed case if upper(password) = password or lower(password) = password then raise_application_error(-20012, 'Password is not mixed case'); end if;
Then run the script utlpwdmg_modif.sql as user SYS and to test:
create profile test_profile limit password_verify_function verify_function_11g; create user test identified by test profile test_profile; connect test/test SQL> alter user test identified by "kachel1#" replace test; alter user test identified by "kachel1#" replace test * ERROR at line 1: ORA-28003: password verification for the specified password failed ORA-20012: Password is not mixed case SQL> alter user test identified by "KACHEL1#" replace test; alter user test identified by "KACHEL1#" replace test * ERROR at line 1: ORA-28003: password verification for the specified password failed ORA-20012: Password is not mixed case SQL> alter user test identified by "Kachel1#" replace test; User altered.