了解Maclean Liu|向Maclean Liu提问 Oracle ALLSTARS 全明星(群内有多位Oracle高级售后support,N位OCM和ACE) QQ群 # QQ群号:23549328 # 已经升级到 2000人群,空位多多。欢迎有一定基础的Oracle骨友加入,现在入群需要经过Maclean的技术面试,欢迎面试,请加QQ号:47079569 为好友参加面试 2群基础群 适合刚入门的同学,会共享最佳入门实践和资料 QQ群 # QQ群号:171092051 # 已经升级到 500人的超级群,空位多多,无需面试

Restoring a user's original password

WARNING
=======

The method described in this article is not officially supported by development,
therefore when you get errors using this procedure support cannot file a bug for it.
Please make no mistakes when setting the HEX value with the VALUES keyword as bad
values may cause internal errors. This undocumented feature exists to support
export / import and retain the original passwords.

Problem Description:
====================

How can you restore a users original password ?

Solution Description:
=====================
With the output of dba_users you can restore a user's old password by
issuing the following:

   alter user <name> identified by values '<original_encrypted_password>';

For example:
============
SQL> create user test identified by test
  2  default tablespace users temporary tablespace temp;

User created.

SQL> select username, password from dba_users where username= 'TEST';

USERNAME   PASSWORD
---------- ------------------------------
TEST       CDC423BEB32B1812

SQL> alter user test identified by test1;
User altered.

SQL> select username, password from dba_users where username= 'TEST';

USERNAME   PASSWORD
---------- ------------------------------
TEST       22F2E341BF4B8764

SQL> alter user test identified by values 'CDC423BEB32B1812';
User altered.

SQL> connect test/test
Connected.

Solution Explanation:
=====================
To do this you would need a spool of dba_users taken before the password was
changed.

posted on 2009-09-22 03:17  Oracle和MySQL  阅读(240)  评论(0编辑  收藏  举报

导航