由于工作需要,对一个用户修改其profile文件后,如果现在的密码不符合规范,是否会引起该用户被锁定,所以做了以下实验。
OS:WIN 7
DB:10.2.0.3.0
实验目的:
对于一个已经存在的用户进行指定profile的操作(在指定前的密码是不符合指定后profile的密码规范的),实验在指定具有新的密码规范的profile后,对于原本不遵守该规范的用户是否会自动进行锁定
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
PERFSTAT OPEN DEFAULT
TEST01 OPEN HUANG_PROFILE
HR OPEN DEFAULT
SCOTT OPEN DEFAULT
OE OPEN DEFAULT
SYSMAN OPEN DEFAULT
DBSNMP OPEN MONITORING_PROFILE
SYSTEM OPEN DEFAULT
SYS OPEN DEFAULT
MGMT_VIEW OPEN DEFAULT
已选择10行。
SYS@huang>alteruser test01 identified by oracle;
alter user test01 identified by oracle
*
第 1 行出现错误:
ORA-28003: 指定口令的口令验证失败
ORA-20002: Password length less than 8
SYS@huang>alteruser test01 profile default;
用户已更改。
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
PERFSTAT OPEN DEFAULT
TEST01 OPEN DEFAULT
HR OPEN DEFAULT
SCOTT OPEN DEFAULT
OE OPEN DEFAULT
SYSMAN OPEN DEFAULT
DBSNMP OPEN MONITORING_PROFILE
SYSTEM OPEN DEFAULT
SYS OPEN DEFAULT
MGMT_VIEW OPEN DEFAULT
已选择10行。
SYS@huang>alteruser test01 identified by oracle;
用户已更改。
SYS@huang>conntest01/oracle
已连接。
TEST01@huang>showuser
USER 为 "TEST01"
TEST01@huang>connsys/oracle as sysdba
已连接。
SYS@huang>alteruser test01 profile HUANG_PROFILE;
用户已更改。
SYS@huang>conntest01/oracle
已连接。
TEST01@huang>showuser
USER 为 "TEST01"
这里可以看出即使指定了新的profile,虽然test01用户的密码不符合规范,但是还是能够正常登陆
TEST01@huang>connsys/oracle as sysdba
已连接。
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
PERFSTAT OPEN DEFAULT
TEST01 OPEN HUANG_PROFILE
HR OPEN DEFAULT
SCOTT OPEN DEFAULT
OE OPEN DEFAULT
SYSMAN OPEN DEFAULT
DBSNMP OPEN MONITORING_PROFILE
SYSTEM OPEN DEFAULT
SYS OPEN DEFAULT
MGMT_VIEW OPEN DEFAULT
已选择10行。
SYS@huang>conntest01/oracle
已连接。
TEST01@huang>showuser
USER 为 "TEST01"
TEST01@huang>quit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:\Users\huang>sqlplustest01/oracle@huang
SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 6月 17 22:09:30 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
TEST01@huang>showuser
USER 为 "TEST01"
TEST01@huang>connsys/oracle as sysdba
已连接。
SYS@huang>setlines 200
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
PERFSTAT OPEN DEFAULT
TEST01 OPEN HUANG_PROFILE
HR OPEN DEFAULT
SCOTT OPEN DEFAULT
OE OPEN DEFAULT
SYSMAN OPEN DEFAULT
DBSNMP OPEN MONITORING_PROFILE
SYSTEM OPEN DEFAULT
SYS OPEN DEFAULT
MGMT_VIEW OPEN DEFAULT
已选择10行。
退出后重新登录,还是能够登陆
SYS@huang>alteruser test01 identified by oracle;
alter user test01 identified by oracle
*
第 1 行出现错误:
ORA-28003: 指定口令的口令验证失败
ORA-20002: Password length less than 8
SYS@huang>alteruser test01 identified by oracle1234;
alter user test01 identified by oracle1234
*
第 1 行出现错误:
ORA-28003: 指定口令的口令验证失败
ORA-20003: Password should contain at least one \
digit, one character and one punctuation
SYS@huang>alteruser test01 identified by oracle!123;
alter user test01 identified by oracle!123
*
第 1 行出现错误:
ORA-00922: 选项缺失或无效
SYS@huang>alteruser test01 identified by oracle$123;
用户已更改。
SYS@huang>conntest01/oracle$123;
已连接。
TEST01@huang>showuser
USER 为 "TEST01"
TEST01@huang>connsys/oracle as sysdba
已连接。
SYS@huang>selectusername,account_status,profile from dba_users where account_status='OPEN';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
PERFSTAT OPEN DEFAULT
TEST01 OPEN HUANG_PROFILE
HR OPEN DEFAULT
SCOTT OPEN DEFAULT
OE OPEN DEFAULT
SYSMAN OPEN DEFAULT
DBSNMP OPEN MONITORING_PROFILE
SYSTEM OPEN DEFAULT
SYS OPEN DEFAULT
MGMT_VIEW OPEN DEFAULT
已选择10行。
实验证明,在指定了新的profile后,新的密码规范不会对现有的用户密码起作用,只有重新修改密码的情况下才会起作用
QQ:49904358
http://space.itpub.net/14941137/spacelist-blog