Note: Taken from this website
export MW_HOME=<location of your weblogic directory>
export DOMAIN_HOME=$MW_HOME/user_projects/domains/<domain_name>
export CLASSPATH=$CLASSPATH:$MW_HOME/wlserver_10.3/server/lib/weblogic.jar
. $DOMAIN_HOME/bin/setDomainEnv.sh
# Shutdown your WebLogic domain:
$DOMAIN_HOME/bin/stopWebLogic.sh
# Rename and backup the DefaultAuthenticatorInit.ldift file:
cd $DOMAIN_HOME/security
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift.old
# Now run the following to generate a new DefaultAuthenticatorInit.ldift file (where ‘weblogic’ is default username):
java weblogic.security.utils.AdminAccount ${username} ${password} .
# NOTE: Don’t forget the period “.” at the end of this command, otherwise you’ll get “Error: Invalid arguments”.
# Rename and backup the following LDAP directory:
mv $DOMAIN_HOME/servers/AdminServer/data/ldap $DOMAIN_HOME/servers/AdminServer/data/ldap.old
# (This LDAP directory will be recreated next time the WebLogic Admin server starts up).
# Edit the boot.properties file and update the password with the one you used above:
cd $DOMAIN_HOME/servers/AdminServer/security
cp boot.properties properties.old
vi boot.properties
#password=<new_password>
#username=<username>
# Don't be dumb like me and not notice username is BELOW password
# REPEAT THIS FOR ANY MANAGED SERVERS in the domain with a boot.properties file. The clear text password will be encrypted next time the server starts.
# Now restart your WebLogic Domain:
$DOMAIN_HOME/startWebLogic.sh
If you are doing this for a WebLogic instance hosting an RTD application, you'll need to update the admin profile to have permissions to use different RTD functionality (if that's how it was before). Steps for it are as follows:
- Go to "Security Realms" in the left-hand tree
- Enter "myrealm"
- Click "Users and Groups" tab
- Click "Groups" sub-tab
- Enter all RTD-related groups per this URL, step 3.1.5.4
- Click "Roles and Policies" tab
- Under "Realm Roles" sub-tab, expand "Global Roles"
- Click "Roles"
- Add each role as listed in the above URL (3.1.5.4).
- Click each new role and assign the appropriate group by:
- Click "Add Conditions"
- Select "Group" in the "Predicate List"
- Click "Next"
- Type the group name needed and click "Add"
- Click "Finish"