Tuesday, April 11, 2017

Change ODI Supervisor Account



Sometimes, you have several boxes and environments, and make a lot of configurations and we don't really keep tracking of all actions done until certain point of time. When you need that password you realize that you don't have it.

In ODI there's a user SUPERVISOR, who controls the master configuration of the tool.

If you want to change it please do the following:

1.- Log in with the master repo user

2.- Execute the following statement:

update snp_user set pass='aYyH5kyea2TN2.YuxopAMy'  
where wuser_name = 'SUPERVISOR'

Where pass is the new encoded password, encoded with the ODI utility encode.sh

Location:
/product/111/odi_111/odi_111/oracledi/agent/bin/encoded.sh newpassword

sh encode.sh newPassword
aYyH5kyea2TN2.YuxopAMy

and once again!,  easy no?




Monday, April 10, 2017

Get the Admin account password in Weblogic Systems


Recently I had the entrust to get the admin account password of weblogic, so after a little bit searching in oracle documentation and web I used the following code:

The steps:

1.- Build script get_password.py

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)

2.- Set the environmental variables

sh $DOMAIN_HOME/bin/setDomainEnv.sh | source $DOMAIN_HOME/bin/setDomainEnv.sh

3.- Get the username and password

grep username $DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^username=\(.*\)/\1/"
|
grep password $DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^password=\(.*\)/\1/"

4.- cd $DOMAIN_HOME/security

java weblogic.WLST get_password.py


bash-3.2$ java weblogic.WLST get_password.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Paste encrypted password ({AES}fk9EK...): (OR USERNAME)

Decrypted string is: admin


Voilá!

Resources:
https://blogs.oracle.com

Update:

If your environment doesn't recognize your wlst command do the following:

 sh /$ENV/fmw/product/111/soa_111/common/bin/wlst.sh get_password.py

You must be located in $DOMAIN_HOME/security.