This discussion is archived
1 Reply Latest reply: Jan 21, 2013 9:52 PM by Kishore Rout RSS

Changing the weblogic admin user password

user8643895 Newbie
Currently Being Moderated
I have faced an issue in reseting weblogic admin user password. Following are the steps i have executed in sequence.please help to understand why it is not working this way

I have 2 managed instances running on two separate computers.

`Step 1.` shutdown the admin server instance ( i did not shutdown the node manager and other 2 manage server instances

`Step 2.` Set the environment variables

`cd $DOMAIN_HOME/bin`


. ./setDomainEnv.sh

`Step 3.` then executed the command below to create the new password

cd ../security
mv DefaultAuthenticatorInit.ldift oldDefaultAuthenticator
java weblogic.security.utils.AdminAccount weblogic new_password .

`Step 4.` backed up existing `boot.properties` file and created a new file. Also backed up data directory of admin server. created a new `boot.properties` file with following configuration

with plain text username(weblogic_admin) and password (new_password).

cd ../servers/AdminServer
mv data data_old
cd security/
mv boot.properties oldboot.properties


Step 5. Then i restarted the admin server. admin server is restarted successfully and i was able to login the admin console with my new username and password. Issue came when i try to shoutdown the admin server. when i execute sh stopWeblogicAdmin.sh , it will through following exception. But , if i kill the admin server process , then i am able to start the admin server with out any problem. and i am able to login to the server also. I am also able to stop and start manage server instances through admin console. But why it is failing only when i try to stop.could anybody help me on this

Stopping Weblogic Server...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://jipsl13t:12001 with userid weblogic_admin ...
This Exception occurred at Fri Jan 18 12:20:09 GMT-00:00 2013.
javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: User: weblogic_admin, failed to be authenticated.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:42)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:682)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:469)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:376)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:520)
at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:573)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:313)
at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203)
at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:61)
at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx4.connect$1(<iostream>:16)
at org.python.pycode._pyx4.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx15.f$0(/product/jip/jipsl11t/wls/eni132_domain/shutdown.py:6)
at org.python.pycode._pyx15.call_function(/product/tsm/jipsl11t/wls/eni132_domain/shutdown.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.util.PythonInterpreter.execfile(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.WLST.main(WLST.java:29)
Caused by: java.lang.SecurityException: User: weblogic_admin, failed to be authenticated.
at weblogic.common.internal.RMIBootServiceImpl.authenticate(RMIBootServiceImpl.java:116)
at weblogic.common.internal.RMIBootServiceImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Problem invoking WLST - Traceback (innermost last):
File "/product/jip/jipsl11t/wls/eni132_domain/shutdown.py", line 6, in ?
File "<iostream>", line 22, in connect
File "<iostream>", line 646, in raiseWLSTException
WLSTException: Error occured while performing connect : User: weblogic_admin, failed to be authenticated.
Use dumpStack() to view the full stacktrace

Done
Stopping Derby Server...

Edited by: user8643895 on Jan 18, 2013 9:28 AM
  • 1. Re: Changing the weblogic admin user password
    Kishore Rout Journeyer
    Currently Being Moderated
    Hi,
    This issue was occurring because stopWebLogic.sh was picking the username and password from properties user config files in user's home directory: username-WebLogicConfig.properties, username-WebLogicKey.properties.
    If the credentials for weblogic server are changed then new user config files should be created, if these are not created then stopWebLogic.sh will pick up the old credentials and hence fail.

    Please refer the following document for information on user configuration files:
    http://docs.oracle.com/cd/E21764_01/web.1111/e13813/reference.htm#WLSTC430

    Connecting to the server after deleting username-WebLogicConfig.properties, username-WebLogicKey.properties resolves the issue as it forces the script to use the credentials provided by the user while running stopWebLogic.sh

    There are two ways you can resolve this issue:
    1) Create new user config files with the correct credentials as explained in the following document:
    http://docs.oracle.com/cd/E21764_01/web.1111/e13813/reference.htm#WLSTC430
    Or

    2) To force the stopWeblogic.sh script to use credentials provided by the user while running the script follow these steps:

    In the stopWeblogic.sh file use the following connect command:
    connect(userConfigFile='',userKeyFile='', url='${ADMIN_URL}', adminServerName='${SERVER_NAME}')instead of:

    connect(${userID} ${password} url='${ADMIN_URL}', adminServerName='${SERVER_NAME}')Hence in the stopWebLogic.sh script replace:

    echo "import os" >"shutdown.py"
    echo "if os.environ.has_key('wlsUserID'):" >>"shutdown.py"
    echo " wlsUserID = os.environ['wlsUserID']" >>"shutdown.py"
    echo "if os.environ.has_key('wlsPassword'):" >>"shutdown.py"
    echo " wlsPassword = os.environ['wlsPassword']" >>"shutdown.py"
    echo "connect(${userID} ${password} url='${ADMIN_URL}', adminServerName='${SERVER_NAME}')" >>"shutdown.py"
    echo "shutdown('${SERVER_NAME}','Server')" >>"shutdown.py"
    echo "exit()" >>"shutdown.py"with:

    echo "import os" >"shutdown.py"
    echo "if os.environ.has_key('wlsUserID'):" >>"shutdown.py"
    echo " wlsUserID = os.environ['wlsUserID']" >>"shutdown.py"
    echo "if os.environ.has_key('wlsPassword'):" >>"shutdown.py"
    echo " wlsPassword = os.environ['wlsPassword']" >>"shutdown.py"
    echo "connect(userConfigFile='',userKeyFile='', url='${ADMIN_URL}', adminServerName='${SERVER_NAME}')" >>"shutdown.py"
    echo "shutdown('${SERVER_NAME}','Server')" >>"shutdown.py"
    echo "exit()" >>"shutdown.py"

    Regards,
    Kishore

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points