Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 1

$
0
0
HOW TO RECOVER THE PASSWORD IN WEBLOGIC SERVER

Step 1:

Run setWlstEnv.sh for setting up the environment variables.
Ex:-
. /u01/Middleware/oracle_common/common/bin/setWlstEnv.sh

Step 2:
weblogic password recover command -
[oracle@localhost bin]$ /opt/installations/tools/jdk1.7.0_55/bin/java weblogic.WLST 
decryptpassword.py /opt/ntdomain/domains/NT {AES}68+XWFqzaQdP5DmEgmkJZWnRWtIvjBd7v+y6h49tCd0\=
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
========================================
          Decrypted Password:p0o9i8u7
========================================
Step 3:
weblogic user recovery command -
[oracle@localhost bin]$ /opt/installations/tools/jdk1.7.0_55/bin/java weblogic.WLST 
decryptpassword.py /opt/ntdomain/domains/NT {AES}WsnwdqROocsh6D1YOclnc1ySRyzheBNtZD2AGLnjIFM\=
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
========================================
          Decrypted Password:weblogic
========================================

decryptpassword.py:
import os
import weblogic.security.internal.SerializedSystemIni
import weblogic.security.internal.encryption.ClearOrEncryptedService

def decryptString(domainPath, encryptedString):
    es = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domainPath)
    ces = weblogic.security.internal.encryption.ClearOrEncryptedService(es)
    decryptedString = ces.decrypt(encryptedString)
    print "=" * 70
    print "" * 10 +"Decrypted Password:" + decryptedString
    print "=" * 70

try:
    os.system('clear')
    if len(sys.argv) == 3:
        decryptString(sys.argv[1], sys.argv[2])
    else:
        print "=" * 70
        print "INVALID ARGUMENTS"
        print "Usage: java weblogic.WLST %s " %sys.argv[0]
        print "example.:"
        print "   java weblogic.WLST %s /oracle/fmwhome/user_projects/domains/NT/ 
{AES}68+XWFqzaQdP5DmEgmkJZWnRWtIvjBd7v+y6h49tCd0\=" %sys.argv[0]
        print "=" * 70
except:
    print "Unexpected error: ", sys.exc_info()[0]
    dumpStack()
    raise


If you got this kind of error "Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/WLST" , 
need to run the command from the Domain bin directory: . ./setDomainEnv.sh


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>