Few times I had faced issue where our team has forgot weblogic admin password, we reset the password using steps below but I had put every thing into korn shell script so that it would be easy to reset the password. Below is the korn shell script which helps to reset your 'admin' password. I had tested the script works for me, please back up original domain before executing the script.
Execution steps :-
1) Shutdown Admin Server
2) ksh VASResetWeblogicAdminUserNamePassword.ksh vasNewUsername vasNewPassword
3) Restart Admin Server. New 'DefaultAuthenticatormyrealmInit.initialized' should have been created under 'DOMAIN_HOME/servers/YourAdminServerName/data/ldap'
Change following parameters in the scripts "vasWLHOME", "vasDomainHome","vasAdminServerName" as per your environment.
### START OF SCRIPT ###
#!/bin/ksh
# Written by Vijay Bheemineni on 11/06/2009
vasNewUserName="$1"
vasNewPassword="$2"
vasWLHOME="/usr/bea10mp1/wlserver_10.0/server/bin"
vasDomainHome="/usr/VASVijay/VASDomains/VASNewDomain"
vasAdminServerName="VASAdminServer"
# Take back up of orginal domain, just as safe side
cp -r ${vasDomainHome} ${vasDomainHome}.org
# set weblogic class path
. ${vasWLHOME}/setWLSEnv.sh
# Create new 'DefaultAuthenticatorInit.ldift' file.
java weblogic.security.utils.AdminAccount ${vasNewUserName} ${vasNewPassword} .
# Back old 'DefaultAuthenticatorInit.ldift' file
cp ${vasDomainHome}/security/DefaultAuthenticatorInit.ldift ${vasDomainHome}/security/DefaultAuthenticatorInit.ldift.org
# Move newly created 'DefaultAuthenticatorInit.ldift' to ${vasDomainHome}/security directory
mv DefaultAuthenticatorInit.ldift ${vasDomainHome}/security/DefaultAuthenticatorInit.ldift
# Move original DefaultAuthenticatormyrealmInit.initialized, new one will be created when we restart the server.
mv ${vasDomainHome}/servers/${vasAdminServerName}/data/ldap/DefaultAuthenticatormyrealmInit.initialized ${vasDomainHome}/servers/${vasAdminServerName}/data/ldap/DefaultAuthenticatormyrealmInit.initialized.org
### END OF SCRIPT ###
Friday, November 6, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment