Saturday, April 9

RESET ADMIN USERNAME AND PASSW0RD

The following are the steps to be followed to reset the Admin UserName/Password.

1. Ensure that your have shutdown all servers -- Admin and Managed.

2. From the command line, run the script setDomainEnv.sh, located in $DOMAIN_HOME/bin/setDomainEnv.sh

3. cd to $DOMAIN_HOME/security
Rename the file 'DefaultAuthenticatorInit.ldift'

4. Create a new initialization file for the default authenticator in the same directory as above ($DOMAIN_HOME/security) by running command :
java weblogic.security.utils.AdminAccount <USERNAME_ADM> <PWD_ADM> $DOMAIN_HOME/security
This should produce a new 'DefaultAuthenticatorInit.ldift'
(can be verified with the time stamp of that file)

5. Rename the files 'DefaultAuthenticatormyrealmInit.initialized' and 'boot.properties'.
 - $DOMAIN_HOME/servers/AdminServer/data/ldap/DefaultAuthenticatormyrealmInit.initialized
- $DOMAIN_HOME/servers/AdminServer/security/boot.properties

6) Start the Admin server
At start time, use the newUser and newPassword values when prompted for user and password.

java -cp /WebLogic/utils/bea922/weblogic92/server/lib/weblogic.jar:$CLASSPATH weblogic.security.utils.AdminAccount

1 comment:

  1. you have to manual steps to get the admin password reset to new password using below steps

    1. Shutdown All Managed Servers,Admin and NM on the domain.

    2. Run the below command to reset the Admin password after setting WLs environment

    source $DOMAIN_HOME/bin/setDomainEnv.sh
    cd $DOMAIN_HOME/security
    cp DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift_bkp
    java weblogic.security.utils.AdminAccount weblogic .
    (the above command will create DefaultAuthenticatorInit.ldift file with new password on the same location)

    3. Run the below steps to re-create the AdminServer,

    cd $DOMAIN_HOME/servers/
    mv Adminserver AdminServer_bkp

    4. Start the AdminServer Manualy for the first time.

    cd $DOMAIN_HOME/bin/
    nohup ./startWebLogic.sh &
    (This time enter the username and new password manually when it asks)

    5. For consistency purpose we are gonna change the nodemanger password as same weblogic admin password,below step is for changing nodemanaged password

    Login Admin Console-->Lock and Edit-->Domain-->Security-->Advanced-->update the Node Manger password (same as weblogic admin)-->Save-->Activate Changes.

    6. Run the below steps for each NodeManager on all servers. (Note: Replace wd**** with actual server where we are running the below commands)

    cd $NM_HOME
    mv nm_data.properties nm_data.properties_bkp
    nohup ./startNodeManager.sh &

    7. Run the below commands to re-enroll the domain with each NodeManager on all servers.

    java weblogic.WLST
    connect('weblogic','','t3://hostname:port')
    nmEnroll('$DOMAIN_HOME','$NM_HOME')

    8. Shutdown the all NodeManager and Admin server.

    9. Bring up the NodeManager on All servers using below commands,

    cd $NM_HOME
    nohup ./startNodeManager.sh &

    10. Bring up the AdminSevers using NodeManager by below commands,

    java weblogic.WLST
    nmConnect('weblogic','','hostname',,'mos','DOMAIN_HOME','plain')
    nmStart('AdminServer')

    11. Login to the Admin Console and bring up All the Managed servers once the Admin Server is up.

    ReplyDelete