阅读内容

关于Oracle 9i数据库密码重用规则分析

[日期:2007-04-09] 来源:Linux公社  作者:Linux



Oracle通过PROFILE中的PASSWORD_REUSE_TIME和PASSWORD_REUSE_MAX来确定密码是否可以重用以及密码重用的限制。

但是,经过测试,发现Oracle的ADMINISTRATOR GUIDE里面的描述是错误的,我查阅了一下METALINK,METALINK上的一篇文章虽然对这两个参数进行了比较详细的说明,但是仍然有一部分描述是错误。

PASSWORD_REUSE_TIME是重用密码的最小时间间隔,单位是天。可以给出整数或分数,如1/1440表示1分钟(出于效率的考虑,oracle不会每分钟都去进行检查,一般来说,有5分钟左右的误差,因此如果这个数小于1/144则没有多大的意义)。

PASSWORD_REUSE_MAX是重用密码前更换密码的最小次数。这两项本身没有任何异议,关键是两项如何配合使用。可以分为3种情况进行描述:

一、PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME都为UNLIMITED

这时密码可以任意重用,没有限制这也是DEFAULT profile的默认值。当这两项都为UNLIMITED时,认为这两个参数没有使用,因此,密码重用没有任何限制。

SQL> create profile prof_test limit password_reuse_max unlimited
2password_reuse_time unlimited;
配置文件已创建
SQL> create user test identified by test profile prof_test;
用户已创建
SQL> alter user test identified by test;
用户已更改。
SQL> alter user test identified by test;
用户已更改。

二、PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME中有一个为UNLIMITED,另一个为其他值。

这个时候你的密码将永远无法重用。看看administrator guide上是怎么说的:

Use the CREATE PROFILE statement to specify a time interval during which users 
cannot reuse a password. In the following statement, a profile is defined where
the PASSWORD_REUSE_TIME clause specifies that the user cannot reuse the 
password
for 60 days.

CREATE PROFILE prof LIMIT
PASSWORD_REUSE_TIME 60
PASSWORD_REUSE_MAX UNLIMITED;

In the next statement, the PASSWORD_REUSE_MAX clause specifies that the number
of password changes the user must make before the current password can be used 
again is three.

CREATE PROFILE prof LIMIT
PASSWORD_REUSE_MAX 3
PASSWORD_REUSE_TIME UNLIMITED;

Note: If you specify PASSWORD_REUSE_TIME or PASSWORD_REUSE_MAX, you must set
the other to UNLIMITED or not specify it at all.

文档告诉我们,只使用其中一个,把另外一个设置为UNLIMITED,但是这是不正确的,这样会导致你的密码永远无法重用。

SQL> alter profile prof_test limit password_reuse_max 3;

配置文件已更改

SQL> select resource_name, limit from dba_profiles
2where profile = 'PROF_TEST' and resource_type = 'PASSWORD';

RESOURCE_NAMELIMIT
-------------------------------- ------------------------
FAILED_LOGIN_ATTEMPTSDEFAULT
PASSWORD_LIFE_TIMEDEFAULT
PASSWORD_REUSE_TIMEUNLIMITED
PASSWORD_REUSE_MAX3
PASSWORD_VERIFY_FUNCTIONDEFAULT
PASSWORD_LOCK_TIMEDEFAULT
PASSWORD_GRACE_TIMEDEFAULT
已选择7行。
SQL> alter user test identified by test;
用户已更改。
SQL> alter user test identified by test;
alter user test identified by test
*
ERROR 位于第 1 行:
ORA-28007: 无法重新使用口令
SQL> alter user test identified by t1;
用户已更改。
SQL> alter user test identified by t2;
用户已更改。
SQL> alter user test identified by t3;
用户已更改。
SQL> alter user test identified by test;
alter user test identified by test
*
ERROR 位于第 1 行:
ORA-28007: 无法重新使用口令
12下一页  GO
【内容导航】
第1页:关于Oracle 9i数据库密码重用规则分析 第2页:关于Oracle 9i数据库密码重用规则分析



相关资讯       oracle 
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google