Search code examples
linuxencryptionshinformatica-powercenter

How to pass encrypted password for execution of a script from Command Task to call pmrep


Scenario

I am working on a code to execute pmrep command. I cannot execute this from Unix box as the Code pages are different ( Unix server where I am executing the pmrep command and where the Power centre is installed), and I dont have any other option to exceute it from the Unix Box, because we dont have sudo login and we are connecting from citrix and Informatica is not installed locally.

So we have come up with an option of putting the pmrep commands in .sh script and passing username, password,environment and path variables from an env file. Then executing the above script from a command task in a workflow.

I am able to execute all the pmrep commands (connect, deploy DG etc) using the above process.

Now comes the problem.

I am saving my username and password in the .env file. I would like to remove this.

For pmrep connect command, I am passing -x $password, I would like to pass the Encrypted password in place of original password. I have used pmpasswd utility to get encrypted password and stored it in a variable (encrypted_password)

  • used that variable in place of orginal. -x $encrytped_password
  • used that variable with -X $encrypted_password.

where -x is used with general password and -X is used with Environmental Password

Both the methods were unsuccessful. with the first one its saying invalid password and with the second one its saying "The environment variable xteyeZk9BYn91bb4Om7xKg== is undefined."

Please help me with the solution on this. Any help is really appreciated. Please let me know if you need more inputs.

Informatica(r) PMREP, version [9.1.0 HotFix6], build [496.0111], LINUX 64-bit

Rakesh


Solution

  • It should be -X encrypted_password without the $.