ITPub博客

首页 > 数据库 > Oracle > 利用数据泵获取oracle用户密码

利用数据泵获取oracle用户密码

原创 Oracle 作者:lixichao1992 时间:2016-07-28 23:34:39 0 删除 编辑
通过expdp/impdp获取oracle普通用户的密码

很多时候,可能需要获取普通用户的密码。但是在oracle 11g,通过视图也无法获取。
最近在做如下导入导出

突然联想到这点,于是就入了如下测试。实现了获取用户密码(准确的说应该是oracle内部记录形式的密码)的目标,以下是测试过程。

------------------

[oracle@PMOTSTdb0 admin]$ sqlplus / as sysdba

SQL> @utlsampl
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@PMOTSTdb0 admin]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 20 14:02:10 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> alter user scott identified by abc12345;
User altered.

expdp system SCHEMAS=scott directory=DATA_PUMP_DIR DUMPFILE=scott.dmp logfile=scott.log &

impdp system SCHEMAS=scott directory=DATA_PUMP_DIR DUMPFILE=scott.dmp logfile=scott.log sqlfile=scott.sql

cd /home/db/oracle/admin/sitdb1/dpdump

cat scott.sql | grep 'IDENTIFIED BY VALUES'
 CREATE USER "SCOTT" IDENTIFIED BY VALUES 'S:D9D841B328D1386A6CD7BB7E3362F635B0FA80262DC4C4A576B23C882F90;238AE5553644174C'
[oracle@PMOTSTdb0 dpdump]$ 

执行创建同名用户,并赋权:
SQL> grant connect,resource to scott identified by values 'S:D9D841B328D1386A6CD7BB7E3362F635B0FA80262DC4C4A576B23C882F90;238AE5553644174C';

Grant succeeded.

SQL> conn scott/abc12345;
Connected.

执行创建异名用户,并赋权:

SQL> conn / as sysdba
Connected.
SQL> grant connect,resource to scott2 identified by values 'S:D9D841B328D1386A6CD7BB7E3362F635B0FA80262DC4C4A576B23C882F90;238AE5553644174C';

Grant succeeded.

SQL> conn scott2/abc12345;
Connected.
SQL> 

到此,就获取并验证了scott用户的密码: abc12345 对应的values='S:D9D841B328D1386A6CD7BB7E3362F635B0FA80262DC4C4A576B23C882F90;238AE5553644174C'
------------------

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30393815/viewspace-2122706/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-08-05

  • 博文量
    9
  • 访问量
    35891