码迷,mamicode.com
首页 > 其他好文 > 详细

【翻译自mos文章】当sec_case_sensitive_logon = true后,怎么启用大小写混合的密码?

时间:2015-08-31 07:39:51      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

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

【翻译自mos文章】当sec_case_sensitive_logon = true后,怎么启用大小写混合的密码?

标签:

原文地址:http://blog.csdn.net/msdnchina/article/details/48128747

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!