Friday, 28 March 2014

Weblogic Server : How to use encrypted username & password with weblogic.Admin command instead of providing hard coded values


How to use encrypted username & password with weblogic.Admin command instead of providing hard coded values

Run belo command to generate encrypted username & password

E:\Oracle\WLS1036\user_projects\domains\base_domain>java weblogic.Admin -username weblogic -password webl0gic -userconfigfile configfile -userkeyfile keyfile STOREUSERCONFIG
Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Do you want to create the key file? y or n  y

( when prompted enter y )


Above command will create two files with name keyfile & configfile under your domain directory, now use both as below instead of providing direct hardcoded username & password 


E:\Oracle\WLS1036\user_projects\domains\base_domain>java weblogic.Admin -url localhost:7001 -userconfigfile E:\Oracle\WLS1036\user_projects\domains\base_domain\configfile -userkeyfile E:\Oracle\WLS1036\user_projects\domains\base_domain\keyfile GETSTATE

Current state of "AdminServer" : RUNNING




No comments:

Post a Comment