Here are the steps
1. Go to the bin folder
typically,
cd <WEBLOGIC INSTALL DIR>/domains/mydomain/bin
2. execute setDomainEnv.sh with an extra '.' (dot) for example
. ./setDomainEnv.sh
3. execute Weblogic WLST command
java weblogic.WLST
4. Once processing is done and terminal/ command-prompt is in offline
execute the following steps for retrieving the passord
a. from weblogic.security.internal import BootProperties
b. BootProperties.load("<WEBLOGIC INSTALL DIR>/domains/mydomain/servers/AdminServer/security/boot.properties", false)
c. prop = BootProperties.getBootProperties()
d. print "username: " + prop.getOneClient()
e. print "password: " + prop.getTwoClient()