Sunday, August 31, 2014

WLST script to change the weblogic admin password

WLST script to change the weblogic admin password

Note: This will work not only for admin server also works for other users present in DefaultAuthenticator

Prepare the shell script to set up the environmental variables and to invoke the wlst

PasswordChange.sh
----------------------------------------

#WL_HOME="Weblogic Home"
WL_HOME=/usr/weblogic/wlserver_10.3"

#JAVA_HOME="java Home"
JAVA_HOME="/usr/java"

# set up common environment
. "${WL_HOME}/server/bin/setWLSEnv.sh"

"${JAVA_HOME}/bin/java"  weblogic.WLST PasswordChange.py

PasswordChange.properties
-------------------------------------------

Weblogic_Admin_URL=t3://weblogic.com:9001
Weblogic_username=weblogic
Weblogic_password=weblogiccurrent
New_Weblogic_password=newPassword
domainName=weblogicdomainname

PasswordChange.py
-------------------------------------------
loadProperties("PasswordChange.properties")
connect(Weblogic_username,Weblogic_password,Weblogic_Admin_URL)
cd('/SecurityConfiguration/'+domainName+'/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.resetUserPassword(Weblogic_username,New_Weblogic_password)
disconnect()
exit()

  • Changes will reflect immediately so no need to restart the server.
  • Update the new password in boot.properties if exist to avoid issue during the server start up.
  • we can also reset the user password through admin console
  • Navigate to security Relams --> myrelam -->users and groups
  • select the user and update the new password


Sunday, August 24, 2014

Apache web server plugins


  •  mod_wl_20.so : To integrate with weblogic application server
  • mod_jk.so : To integrate with Tomcat server
  • libmod_sm20.so: Site minder