您好,登錄后才能下訂單哦!
這篇文章主要講解了“設定Oracle用戶名密碼的規則有哪些”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“設定Oracle用戶名密碼的規則有哪些”吧!
$ sqlplus / as sysdba
SQL > select profile,resource_name,resource_type,limit from dba_profiles where profile=(select PROFILE from dba_users where username=upper('&user_name'));
$ sqlplus / as sysdba
SQL > @?/rdbms/admin/utlpwdmg.sql
l 最小長度8
l 不能與用戶名相同或相似
l 不能是用戶名倒序。
l 不能與前密碼超過3個字符相同
l 至少包含一個“\”、“數字”以及“字符”
$ sqlplus / as sysdba
SQL> select 'alter profile ' || profile ||
' limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION;'
from dba_profiles
group by profile;
'ALTERPROFILE'||PROFILE||'LIMITPASSWORD_VERIFY_FUNCTIONVERIFY_FUNCTION;'
--------------------------------------------------------------------------------------------
alter profile MONITORING_PROFILE limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION;
alter profile DEFAULT limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION; # 使用需要修改profile相應語句即可
SYS@honor1 > alter profile DEFAULT limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION;
Profile altered.
SYS@honor1 > alter user hr identified by 111111; # 規則已經生效,簡單密碼已經無法使用
alter user hr identified by 111111
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20003: Password should contain at least one \
digit, one character and one punctuation
SYS@honor1 > CREATE PROFILE new_profile LIMIT
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
CONNECT_TIME UNLIMITED
IDLE_TIME 600
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
COMPOSITE_LIMIT UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 10
PASSWORD_VERIFY_FUNCTION verify_function;
Profile created.
SYS@honor1 > alter user hr profile new_profile;
User altered.
SYS@honor1 > alter user hr identified by 111111;
alter user hr identified by 111111
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed # 新規則已經生效
ORA-20003: Password should contain at least one \
digit, one character and one punctuation
SYS@honor1 > alter profile DEFAULT limit PASSWORD_VERIFY_FUNCTION null;
Profile altered.
SYS@honor1 > alter user hr identified by 111111; # 可以看到密碼規則已經失效
User altered.
SYS@honor1 > alter user hr profile default; #如果原來使用了自定義profile則輸入原來名稱
User altered.
SYS@honor1 > alter user hr identified by 111111; # 可以看到密碼規則已經失效
User altered.
SYS@honor1 > alter profile DEFAULT limit PASSWORD_LIFE_TIME 90; # 修改為90天
Profile altered.
SYS@honor1 > select profile,resource_name,resource_type,limit from dba_profiles where profile='DEFAULT';
Caution:
設定較短有效期,一定要注意密碼有效期,及時在有效期前修改密碼,防止密碼過期導致應用連接數據庫失敗。
SYS@honor1 > alter profile default limit PASSWORD_REUSE_TIME 365;
Profile altered.
SYS@honor1 > select profile,resource_name,resource_type,limit from dba_profiles where profile='DEFAULT';
SYS@honor1 > alter profile default limit PASSWORD_REUSE_MAX 5;
Profile altered.
SYS@honor1 > select profile,resource_name,resource_type,limit from dba_profiles where profile='DEFAULT';
SYS@honor1 > alter profile DEFAULT limit PASSWORD_LIFE_TIME 180;
SYS@honor1 > alter profile default limit PASSWORD_REUSE_TIME UNLIMITED;
SYS@honor1 > alter profile default limit PASSWORD_REUSE_MAX UNLIMITED;
感謝各位的閱讀,以上就是“設定Oracle用戶名密碼的規則有哪些”的內容了,經過本文的學習后,相信大家對設定Oracle用戶名密碼的規則有哪些這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。