Oracle EBS R12下如何破解用户密码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle EBS R12下如何破解用户密码相关的知识,希望对你有一定的参考价值。

参考技术A �0�21.创建Package,这个package会调用内部的解码类--创建Package Head CREATE OR REPLACE PACKAGE GET_PWD AS FUNCTION DECRYPT(KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2; END GET_PWD; / --创建Package Body CREATE OR REPLACE PACKAGE BODY GET_PWD AS FUNCTION DECRYPT(KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String'; END GET_PWD; /�0�22.查询用户SELECT USR.USER_NAME, GET_PWD.DECRYPT((SELECT (SELECT GET_PWD.DECRYPT(FND_WEB_SEC.GET_GUEST_USERNAME_PWD, USERTABLE.ENCRYPTED_FOUNDATION_PASSWORD) FROM DUAL) AS APPS_PASSWORD FROM APPS.FND_USER USERTABLE WHERE USERTABLE.USER_NAME = (SELECT SUBSTR(FND_WEB_SEC.GET_GUEST_USERNAME_PWD, 1, INSTR(FND_WEB_SEC.GET_GUEST_USERNAME_PWD, '/') - 1) FROM DUAL)), USR.ENCRYPTED_USER_PASSWORD) PASSWORD FROM APPS.FND_USER USR WHERE USR.USER_NAME = '&USER_NAME';�0�2�0�2本回答被提问者采纳

Oracle EBS FND User Info API (转) EBS用户账号密码职责相关

1. 与用户信息相关API PKG.


--和用户处理有关的API

FND_USER_PKG;
 
 
--和用户密码处理有关的API
FND_WEB_SEC;
 
 
--和用户职责处理有关的API
FND_USER_RESP_GROUPS_API;
 
 
2. 激活失效用户帐号.
-----------------------------
---处理实例
-----------------------------
 
SELECT * FROM FND_USER WHERE USER_NAME = QWR01;
 
---更新用户,将用户失效:
DECLARE
BEGIN
FND_USER_PKG.UpdateUser
(
x_user_name => QWR01
,x_owner => NULL
,x_end_date => SYSDATE
);
--用下面的也可以,其实还是调用一样的处理过程。
--FND_USER_PKG.DisableUser(‘QWR01‘);
END;
 
 
--批量失效用户:
DECLARE
   CURSOR CUR_DISABLE_USER
   IS
      SELECT USER_NAME
        FROM FND_USER
       WHERE USER_NAME IN (‘‘);
   L_DEAL_COUNT NUMBER;
BEGIN
   L_DEAL_COUNT := 0;
   FOR REC_DISABLE_USER IN CUR_DISABLE_USER LOOP
      FND_USER_PKG.DisableUser(REC_DISABLE_USER.USER_NAME);
      L_DEAL_COUNT := L_DEAL_COUNT+L_DEAL_COUNT;
   END LOOP;
   DBMS_OUTPUT.PUT_LINE(成功失效用户数:||L_DEAL_COUNT);
END;
 
---------------
---批量失效用户----
---------------
DECLARE
   CURSOR CUR_DISABLE_USER
   IS
      SELECT USER_NAME
        FROM FND_USER
       WHERE SYSDATE BETWEEN START_DATE AND NVL(END_DATE,SYSDATE+1)
         AND USER_NAME IN (QWR01);
   L_DEAL_COUNT NUMBER;
BEGIN
   fnd_global.APPS_Initialize( user_id=>1183, resp_id=>20420, resp_appl_id =>1);
   L_DEAL_COUNT := 0;
   FOR REC_DISABLE_USER IN CUR_DISABLE_USER LOOP
      FND_USER_PKG.DisableUser(REC_DISABLE_USER.USER_NAME);
      L_DEAL_COUNT := L_DEAL_COUNT+1;
   END LOOP;
   COMMIT;
   DBMS_OUTPUT.PUT_LINE(成功失效用户数:||L_DEAL_COUNT);
END;
 
3. 激活失效用户职责.
--增加用户的职责:
FND_USER_PKG.AddResp;
 
 
--失效用户的职责:
FND_USER_PKG.DelResp;
---------------------
---失效用户的职责----
---------------------
 
---失效超过一定日期没使用过的职责。
DECLARE
   CURSOR CUR_DISABLE
   IS
      SELECT FU.USER_ID
            ,FU.USER_NAME
            ,FRESP.APPLICATION_SHORT_NAME
            ,FRESP.RESPONSIBILITY_KEY
            ,FRESP.SECURITY_GROUP_KEY
            ,FRESP.RESPONSIBILITY_NAME
            ,FRESP.START_DATE
            ,FRESP.END_DATE
            ,RESP_LOGIN.MAX_START_TIME
        FROM FND_USER_RESP_GROUPS_DIRECT_V FRESP
            ,FND_USER FU
            ,(SELECT FL.USER_ID,FLR.RESPONSIBILITY_ID,MAX(FLR.START_TIME) MAX_START_TIME
            FROM FND_LOGIN_RESPONSIBILITIES FLR,FND_LOGINS FL
             WHERE FLR.LOGIN_ID = FL.LOGIN_ID
             GROUP BY FL.USER_ID,FLR.RESPONSIBILITY_ID) RESP_LOGIN
       WHERE 1=1
         AND FU.USER_ID = FRESP.USER_ID
         AND RESP_LOGIN.USER_ID(+) = FRESP.USER_ID
         AND RESP_LOGIN.RESPONSIBILITY_ID(+) = FRESP.RESPONSIBILITY_ID
         AND ((SYSDATE - RESP_LOGIN.MAX_START_TIME) >= 60 OR RESP_LOGIN.MAX_START_TIME IS NULL)
         AND SYSDATE BETWEEN FU.START_DATE AND NVL(FU.END_DATE,SYSDATE+1)
         AND SYSDATE BETWEEN FRESP.START_DATE AND NVL(FRESP.END_DATE,SYSDATE+1)
         AND FU.USER_NAME = QWR01
         AND FRESP.RESPONSIBILITY_KEY = XYG-WH-WCB-OM-QUERY
       ORDER BY FU.USER_NAME,FRESP.RESPONSIBILITY_NAME;
      
   L_DEAL_COUNT NUMBER;
BEGIN
   fnd_global.APPS_Initialize( user_id=>1183, resp_id=>20420, resp_appl_id =>1);
   L_DEAL_COUNT := 0;
   DELETE XYG_PUB_COMMON_TABLE_TEMP;
   FOR REC_DISABLE IN CUR_DISABLE LOOP
 FND_USER_PKG.DelResp(REC_DISABLE.USER_NAME,REC_DISABLE.APPLICATION_SHORT_NAME,REC_DISABLE.RESPONSIBILITY_KEY,REC_DISABLE.SECURITY_GROUP_KEY);
      L_DEAL_COUNT := L_DEAL_COUNT+1;
   END LOOP;
   COMMIT;
   DBMS_OUTPUT.PUT_LINE(成功失效职责数:||L_DEAL_COUNT);
END;
 
 
4. 用户密码相关.
---直接修改密码。这是直接修改的密码,User重新登录之后,直接登录。下面有修改密码之后,第一次用户登录必须要更改口令的过程。
SELECT fnd_web_sec.change_password(QWR01,PASSWORD) FROM DUAL;
 
 
---验证密码的有效性
SELECT fnd_web_sec.validate_login(QWR01,PASSWORD) FROM DUAL;
 
 
---获取错误的信息。
select fnd_message.get() from dual;
 
 
---获取加密的密码
declare
  l_enc_fnd_pwd VARCHAR2(4000);
  l_enc_user_pwd VARCHAR2(4000);
  L_RETURN VARCHAR2(4000);
begin
L_RETURN :=  fnd_web_sec.get_encrypted_passwords(QWR01,5954,PASSWORD1,l_enc_fnd_pwd,l_enc_user_pwd);
DBMS_OUTPUT.PUT_LINE(L_RETURN:||L_RETURN);
DBMS_OUTPUT.PUT_LINE(p_enc_fnd_pwd:||l_enc_fnd_pwd||CHR(10)||p_enc_user_pwd:||l_enc_user_pwd);
end;
 
 
---修改:ENCRYPTED_USER_PASSWORD,暂时没测试。
declare
   newpass varchar2(100);
begin
   newpass := fnd_user_pkg.getreencryptedpassword(QWR01, NEWKEY);
   DBMS_OUTPUT.PUT_LINE(newpass:||newpass);
   --fnd_user_pkg.setreencryptedpassword(‘QWR01‘, newpass, ‘NEWKEY‘);
end;
 

 

以上是关于Oracle EBS R12下如何破解用户密码的主要内容,如果未能解决你的问题,请参考以下文章

Oracle EBS R12客户模型表结构

Oracle EBS R12客户模型表结构

oracle ebs r11 和 r12 有啥区别吗?

Oracle Ebs R12 SLA与GL关系变化

更改EBS R12中forms的模式Servlet/Socket

Oracle EBS R12 (12.1.3) Installation Linux(64 bit)