Saturday, September 6, 2014

Find Password in Oracle E-Business Suite 11i and R12

This scripts allows to view the passwords which are stored encrypted in fnd_user table. You can use different sqls to find apps password and application user passwords. Create Package CREATE OR REPLACE PACKAGE XXARTO_GET_PWD AS FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2; END XXARTO_GET_PWD; CREATE OR REPLACE PACKAGE BODY XXARTO_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 XXARTO_GET_PWD; Find apps password in 11i SELECT (SELECT XXARTO_GET_PWD.Decrypt ( UPPER( (SELECT UPPER (Fnd_Profile.VALUE ('Guest_User_Pwd')) FROM DUAL)), Usertable.Encrypted_Foundation_Password) FROM DUAL) AS Apps_Password FROM applsys.Fnd_User Usertable WHERE Usertable.User_Name LIKE UPPER( (SELECT SUBSTR ( Fnd_Profile.VALUE ('Guest_User_Pwd'), 1, INSTR (Fnd_Profile.VALUE ('Guest_User_Pwd'), '/') - 1) FROM DUAL)); Find apps password in R12 SELECT (SELECT XXARTO_GET_PWD.Decrypt ( Fnd_Web_Sec.Get_Guest_Username_Pwd, Usertable.Encrypted_Foundation_Password) FROM DUAL) AS Apps_Password FROM applsys.Fnd_User Usertable WHERE Usertable.User_Name LIKE (SELECT SUBSTR ( Fnd_Web_Sec.Get_Guest_Username_Pwd, 1, INSTR (Fnd_Web_Sec.Get_Guest_Username_Pwd, '/') - 1) FROM DUAL); Find application user password (for exaample SYSADMIN) in 11i SELECT Usertable.User_Name, (SELECT XXARTO_GET_PWD.Decrypt ( UPPER( (SELECT (SELECT XXARTO_GET_PWD.Decrypt ( UPPER( (SELECT UPPER(Fnd_Profile.VALUE('Guest_User_Pwd')) FROM DUAL)), Usertable.Encrypted_Foundation_Password) FROM DUAL) AS Apps_Password FROM applsys.Fnd_User Usertable WHERE Usertable.User_Name LIKE UPPER( (SELECT SUBSTR ( Fnd_Profile.VALUE ( 'Guest_User_Pwd'), 1, INSTR ( Fnd_Profile.VALUE ( 'Guest_User_Pwd'), '/') - 1) FROM DUAL)))), Usertable.Encrypted_User_Password) FROM DUAL) AS Encrypted_User_Password FROM Applsys.Fnd_User Usertable WHERE Usertable.User_Name LIKE UPPER ('&Username'); Find application user password (for exaample SYSADMIN) in R12 SELECT Usr.User_Name, Usr.Description, XXARTO_GET_PWD.Decrypt ( (SELECT (SELECT XXARTO_GET_PWD.Decrypt ( Fnd_Web_Sec.Get_Guest_Username_Pwd, Usertable.Encrypted_Foundation_Password) FROM DUAL) AS Apps_Password FROM applsys.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 applsys.Fnd_User Usr WHERE Usr.User_Name = '&User_Name';