RUI个人博客 首页>>Oracle Basic Knowledge>>[原] 忘记oracle用户密码重置密码延长过期时间

[原] 忘记oracle用户密码重置密码延长过期时间

案例:

  每个用户都有默认的 profile设置 由于部分用户的 密码已经达到过期时间,但是忘记了之前的密码,通过此方法修改密码来实现过期时间的延长。

注:如果 profile 对于密码的使用次数和重用次数有设置,先修改 Profile 修改密码完成后,再改回原来的profile;

以下是实验测试过程:

SYS@RACDB1>create user tyger1 identified by oracle;

User created.

SYS@RACDB1>grant create session to tyger1;

Grant succeeded.

SYS@RACDB1>
SYS@RACDB1>
SYS@RACDB1>
SYS@RACDB1>conn tyger1/oracle
Connected.
TYGER1@RACDB1>
TYGER1@RACDB1>conn / as sysdba
Connected.
SYS@RACDB1>conn tyger1/Oracle
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
@>conn / as sysdba
Connected.
SYS@RACDB1>show parameter sec

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_securefile                        string      PERMITTED
optimizer_secure_view_merging        boolean     TRUE
sec_case_sensitive_logon             boolean     TRUE
sec_max_failed_login_attempts        integer     10
sec_protocol_error_further_action    string      CONTINUE
sec_protocol_error_trace_action      string      TRACE
sec_return_server_release_banner     boolean     FALSE
sql92_security                       boolean     FALSE

SYS@RACDB1>select spare4,password from user$ where name='TYGER1';

SPARE4
-------------------------------------------------------------------------------------------------
PASSWORD
------------------------------
S:FA437ADC94A1CC2AAC9E41B8AE0D65F199E560F4AEA687446C444E435554
C7C86E4B901FE266
SYS@RACDB1>select password from dba_users where username='TYGER1';

PASSWORD
------------------------- # 11g 中为空值

SYS@RACDB1>

SYS@RACDB1>alter user tyger1 identified by tyger1;

User altered.

SYS@RACDB1>select spare4,password from user$ where name='TYGER1';

SPARE4
-----------------------------------------------------------------------------------------
PASSWORD
------------------------------
S:CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E
846A7A252D6C455A


SYS@RACDB1>alter user tyger1 identified by values 'C7C86E4B901FE266';

User altered.

SYS@RACDB1>conn tyger1/oracle
Connected.
TYGER1@RACDB1>conn / as sysdba
Connected.
SYS@RACDB1>select spare4,password from user$ where name='TYGER1';

SPARE4
-----------------------------------------------------------------------------------------------
PASSWORD
------------------------------

C7C86E4B901FE266


SYS@RACDB1>conn tyger1/ORACLE
Connected.
TYGER1@RACDB1>conn / as sysdba
Connected.
alter user tyger1 
identified by values 'CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E';
alter user tyger1 identified by values 'CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E'
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [kzsviver:2], [], [], [], [], [], [], [], [], [], [], []


SYS@RACDB1>
alter user tyger1 
identified by values 'S:CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E';

User altered.

SYS@RACDB1>conn tyger1/oracle
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
@>conn tyger1/tyger1
Connected.
TYGER1@RACDB1>conn / as sysdba
Connected.
SYS@RACDB1>select spare4,password from user$ where name='TYGER1';

SPARE4
-------------------------------------------------------------------------------------------------
PASSWORD
------------------------------
S:CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E



SYS@RACDB1>          
SYS@RACDB1>conn tyger1/TYGER1
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
@>conn / as sysdba
Connected.
SYS@RACDB1>
SYS@RACDB1>
alter user tyger1 
identified by values 'S:CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E;846A7A252D6C455A';

User altered.

SYS@RACDB1>
SYS@RACDB1>select spare4,password from user$ where name='TYGER1';

SPARE4
----------------------------------------------------------------------------------------------------
PASSWORD
------------------------------
S:CD1486AF4C5AFE547D432E80FE590F74F8EFCB4367BEC4F73C3E7DA3377E
846A7A252D6C455A


SYS@RACDB1>conn tyger1/oracle
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
@>
@>conn tyger1/tyger1
Connected.
TYGER1@RACDB1>conn tyger1/TYGER1
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
@>


关于恢复之前的密码总结:
1. 通过values user$.password恢复以前密码后,不区分大小写
2. 通过values user$.spare4恢复以前密码后,区分大小写
3. 目前两种方式都可以实现11g恢复以前密码,这样完全和之前一样 spare4;password 修改

昵  称:
邮  箱:
评论内容:
验 证 码:
可用[code][/code]插入代码
点击刷新验证码