国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

Oracle 9i密碼策略--密碼重用規(guī)則

2024-08-29 13:35:41
字體:
供稿:網(wǎng)友
Oracle通過PROFILE中的PASSWord_REUSE_TIME和PASSWORD_REUSE_MAX來確定密碼是否可以重用以及密碼重用的限制。 但是,經(jīng)過測試,發(fā)現(xiàn)Oracle的ADMINISTRATOR GUIDE里面的描述是錯(cuò)誤的,我查閱了一下METALINK,METALINK上的一篇文章雖然對這兩個(gè)參數(shù)進(jìn)行了比較具體的說明,但是仍然有一部分描述是錯(cuò)誤。 PASSWORD_REUSE_TIME是重用密碼的最小時(shí)間間隔,單位是天??梢越o出整數(shù)或分?jǐn)?shù),如1/1440表示1分鐘(出于效率的考慮,oracle不會每分鐘都去進(jìn)行檢查,一般來說,有5分鐘左右的誤差,因此假如這個(gè)數(shù)小于1/144則沒有多大的意義)。 PASSWORD_REUSE_MAX是重用密碼前更換密碼的最小次數(shù)。這兩項(xiàng)本身沒有任何異議,要害是兩項(xiàng)如何配合使用。可以分為3種情況進(jìn)行描述: 一、PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME都為UNLIMITED 這時(shí)密碼可以任意重用,沒有限制這也是DEFAULT profile的默認(rèn)值。當(dāng)這兩項(xiàng)都為UNLIMITED時(shí),認(rèn)為這兩個(gè)參數(shù)沒有使用,因此,密碼重用沒有任何限制。
SQL> create profile prof_test limit password_reuse_max unlimited 2password_reuse_time unlimited; 配置文件已創(chuàng)建 SQL> create user test identified by test profile prof_test; 用戶已創(chuàng)建 SQL> alter user test identified by test; 用戶已更改。 SQL> alter user test identified by test; 用戶已更改。
二、PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME中有一個(gè)為UNLIMITED,另一個(gè)為其他值。 這個(gè)時(shí)候你的密碼將永遠(yuǎn)無法重用。 看看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.
文檔告訴我們,只使用其中一個(gè),把另外一個(gè)設(shè)置為UNLIMITED,但是這是不正確的,這樣會導(dǎo)致你的密碼永遠(yuǎn)無法重用。
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: 無法重新使用口令
修改profile后,只對test用戶的后續(xù)操作有效,第一次可以修改密碼為test是因?yàn)閛racle沒有記錄初始密碼,而第二次修改就會失敗,因?yàn)槊艽a已經(jīng)不能重用了。 根據(jù)文檔,我們只需要修改密碼三次,就可以重用,但是測試的結(jié)果確是密碼無法在重用。






SQL> alter profile prof_test limit password_reuse_max unlimited; 配置文件已更改 SQL> alter user test identified by test; 用戶已更改。 SQL> alter profile prof_test limit password_reuse_time 1/144; 配置文件已更改 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_TIME.0069 PASSWORD_REUSE_MAXUNLIMITED PASSWORD_VERIFY_FUNCTIONDEFAULT PASSWORD_LOCK_TIMEDEFAULT PASSWORD_GRACE_TIMEDEFAULT 已選擇7行。 SQL> set time on 16:47:29 SQL> alter user test identified by test; alter user test identified by test * ERROR 位于第 1 行: ORA-28007: 無法重新使用口令 16:47:48 SQL> 16:48:23 SQL> 16:59:45 SQL> alter user test identified by test; alter user test identified by test * ERROR 位于第 1 行: ORA-28007: 無法重新使用口令 16:59:59 SQL> 17:07:32 SQL> alter user test identified by test; alter user test identified by test * ERROR 位于第 1 行: ORA-28007: 無法重新使用口令 17:07:40 SQL> set time off
修改PASSWORD_REUSE_TIME為1/144,也就是說大概10分鐘的時(shí)間,考慮的oracle的誤差,我們在10分鐘和20分鐘后分別進(jìn)行測試。結(jié)果發(fā)現(xiàn)密碼仍然無法重用。 三、PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME都不為UNLIMITED。 這時(shí)只需滿足任意一個(gè)條件就可以重用密碼 Metalink上的文章在這里描述有誤,密碼重用不需要同時(shí)滿足兩個(gè)條件,只要滿足一個(gè)既可。
SQL> alter profile prof_test limit password_reuse_time unlimited; 配置文件已更改 SQL> alter user test identified by test; 用戶已更改。 SQL> alter profile prof_test limit 2password_reuse_max 3 password_reuse_time 1/144; 配置文件已更改 SQL> set time on 17:11:30 SQL> alter user test identified by test; 用戶已更改。 17:11:47 SQL> alter user test identified by test; alter user test identified by test * ERROR 位于第 1 行: ORA-28007: 無法重新使用口令 17:11:56 SQL> alter user test identified by t1; 用戶已更改。 17:12:06 SQL> alter user test identified by t2;
用戶已更改。 17:12:12 SQL> alter user test identified by t3; 用戶已更改。 17:12:19 SQL> alter user test identified by test; 用戶已更改。 17:12:50 SQL> 17:13:45 SQL> alter user test identified by test; alter user test identified by test * ERROR 位于第 1 行: ORA-28007: 無法重新使用口令 17:13:55 SQL> 17:14:00 SQL> 17:32:14 SQL> alter user test identified by test; 用戶已更改。
第一次重用test密碼才過了1分鐘左右,而在第二次重用test密碼之前并沒有使用過其他密碼。可見,只需滿足PASSWORD_REUSE_MAX和PASSWORD_REUSE_TIME中的任意一個(gè)條件就可以。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 武陟县| 阜新| 罗甸县| 包头市| 阿拉善右旗| 宁都县| 扎囊县| 镇江市| 鹰潭市| 博罗县| 四平市| 石台县| 霍州市| 江孜县| 砚山县| 泸水县| 德保县| 广安市| 柳州市| 昌黎县| 错那县| 宜君县| 湛江市| 抚顺县| 荥经县| 城市| 湖口县| 清涧县| 茂名市| 黄梅县| 邵武市| 镇坪县| 财经| 涿鹿县| 旬阳县| 隆化县| 金山区| 内乡县| 绥化市| 右玉县| 翁源县|