簡體   English   中英

wlst 離線將用戶添加到現有域

[英]wlst offline add user to existing domain

我想使用 WLST 在離線模式下將用戶添加到現有域。 這可能嗎? 我有以下腳本

readDomain(DOMAIN_HOME)
cd('/Security')
cd(DOMAIN_NAME)
cd('User')
user = create(USERNAME,"User")
user.setPassword(PASSWORD)

它排除了以下錯誤,我無法從中做出正面或反面。

com.oracle.cie.domain.script.jython.WLSTException: Security info unavailable when a domain is read and no security type can be created.
    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:3085)
    at com.oracle.cie.domain.script.jython.WLScriptContext.cd(WLScriptContext.java:1451)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.oracle.cie.domain.script.jython.WLSTState.processCommand(WLSTState.java:226)
    at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:732)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyInstance.invoke(Unknown Source)
    at org.python.pycode._pyx5.command$1(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py:19)
    at org.python.pycode._pyx5.call_function(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(PyFunction.java:184)
    at org.python.pycode._pyx5.cd$12(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py:55)
    at org.python.pycode._pyx5.call_function(/private/var/folders/05/lxzxmx693njf8gvh69p39nnr0000gn/T/WLSTOfflineIni3567769399441384102.py)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(PyFunction.java:181)
    at org.python.pycode._pyx105.f$0(<console>:1)
    at org.python.pycode._pyx105.call_function(<console>)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyCode.call(Unknown Source)
    at org.python.core.Py.runCode(Py.java:1226)
    at org.python.core.Py.exec(Py.java:1252)
    at org.python.util.PythonInterpreter.exec(Unknown Source)
    at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
    at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
    at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
    at weblogic.management.scripting.utils.WLSTInterpreter.runsource(WLSTInterpreter.java:1095)
    at weblogic.management.scripting.WLST.main(WLST.java:232)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.Exception: Security info unavailable when a domain is read and no security type can be created.
    at com.oracle.cie.domain.script.jython.WLScriptContext.blockSecurity4ReadDomain(WLScriptContext.java:3777)
    at com.oracle.cie.domain.script.jython.WLScriptContext.updateCmo(WLScriptContext.java:3376)
    at com.oracle.cie.domain.script.jython.WLScriptContext.cd(WLScriptContext.java:1441)
    ... 42 more

使用 WLST,這是不可能的。 安全配置必須連接到管理服務器。 另一種選擇是創建域模板並包含您的用戶。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM