1

I have a weblogic domain,

  1. I added some users to the default security realm (myrealm) with web console.
  2. Then I shutdown weblogic.
  3. And run an offline WLST script which readDomain(...) from this domain directory and created a template with writeTemplate(...) named template.jar
  4. Run another WLST script to create a new domain from template.jar
  5. I Startup new domain.

Then I found users in myrealm are missing. I am new to weblogic and WLST. It seems WLST did not export users/password to template? How can I make security realm users/password pre-configured with WLST? So I does not need to create many users/password by manual?

1 Answer 1

1

You will have to do this in online mode because of the nature of Weblogic's embedded LDAP. You can do this via the console if you go to:

Home >Summary of Security Realms >myrealm >Users and Groups>Migration tab

And do an export of the domain and import into the new domain.

This can be done with online wlst like:

connect('weblogic','weblogic', 't3://origDomain:7001')
domainRuntime()
cd('/DomainServices/DomainRuntimeService/DomainConfiguration/FirstDomain/SecurityConfiguration/FirstDomain/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.exportData('DefaultAtn','/tmp/your.ldif', Properties())

connect('weblogic','weblogic', 't3://newDomain:8001')
domainRuntime()
cd('/DomainServices/DomainRuntimeService/DomainConfiguration/SecondDomain/SecurityConfiguration/SecondDomain/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.importData('DefaultAtn','/app/userdata/abc.ldif', Properties())
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.