Friday, November 10, 2017

FNDCPASS

FNDCPASS


In Oracle Application R12, 

we have an FND functionality for changing the passwords for either application user, or product schema password or most important – 
the “APPS” password. The FND binary which will help us is doing these things is FNDCPASS.


This is present in $FND_TOP/bin directory.

Using FNDCPASS

Below is the usage for FNDCPASS

-bash-2.05b$ FNDCPASS
FNDCPASS logon 0 Y system/password mode username new_password
where logon is username/password[@connect]

system/password is password of the system account of that database
mode is SYSTEM/USER/ORACLE
username is the username where you want to change its password
new_password is the new password in unencrypted format

example 

FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS WELCOME

FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1

FNDCPASS apps/apps 0 Y system/manager USER VISION WELCOME

You can just type FNDCPASS and press enter, it will give you these details.


STEP 1 
---------
Usage A

FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS WELCOME

is for changing the password for apps and applsys. These are the database schema users (most important for application to work).
 Password for both these users should be in synch. You can change the password of these users using this command. Note that this is the only way to change the password for apps and applsys. Please do not try any other method for changing apps and applsys password. Oracle recomends using FNDCPASS only to change apps and applsys password. Also note that using this command will change the password for both apps and applsys.
Following activities will take place
(1) applsys validation. (make sure APPLSYS name is correct)
(2) re-encrypt all password in FND_USER
(3) re-encrypt all password in FND_ORACLE_USERID
(4) update applsys’s password in FND_ORACLE_USERID table.
(5) Update apps password in FND_ORACLE_USERID table.

Also changes are made in DBA_USERS table.

Usage B

FNDCPASS apps/apps 0 Y system/manager ORACLE GL GL1

is for changing password for any other product schema like MSC, GL etc.
Following activities will take place
(1) update GL’s password in FND_ORACLE_USERID table. The new password is re-encrypted with the current applsys password.
If GL does not exists, step (2) below does not happen. Message for invalid oracle user is written in the log file.
(2) alter user to change GL’s password.

USAGE C

FNDCPASS apps/apps 0 Y system/manager USER   VISION  WELCOME

is for changing the application level passwords like sysadmin etc used for logging into application.
Following activities will take place
(1) update VISION’s password in FND_USER table. 

The new password is re-encrypted with the current applsys password.

If VISION does not exist, message for invalid application user is written in the log file.
No products affected by the patch
When you run FNDCPASS command it will check the integrity of all schema password in the application. 
If any of the password is corrupt then this will through and error and will not change the password.
The tables that it uses is FND_USER and FND_ORACLE_USERID. All the application passwords and schema passwords are stored in these two tables. Ofcourse DBA_USERS  will have the schema users and password stored as well.
When we run FNDCPASS it will update all the above 3 tables.

Best practices for using FNDCPASS

Before using FNDCPASS and changing the passwords from default to some thing else, always follow the following best practices.
1) Always, Always, Always keep the back of tables FND_USER and FND_ORACLE_USERID
You can take back of these tables using CREATE TABLE — AS SELECT * FROM —.
You must have backup of these tables before running FNDCPASS.

 In case if FNDCPASS fails then it might corrupt the passwords of your application and worst can happen that the application wont come up. So always be cautions about this command.

2) If possible also keep an export dump of these two tables.

3) verify each arguement you are providing to FNDCPASS. Like verify that apps and system passwords you are providing is correct.

4) Never update apps, applsys or any schema password directly from database using the alter command. Always use FNDCPASS. System password can be set directly using ALTER command in database.




No comments: