Non-interactive does not give secre value

Latest response


We have a problem where we are calling from another script non-interactively and although it creates the user as desired but unlike interactive mode it does not provide the secret value at the end when you answer yes for the question "Is this new user going to be used for one AS process to connect to another AS process?"(this section itself does not come up). Is there a way solution to this problem where I can use the script in non-interactive mode but also obtain the secret value ?



please check this link -

specially sections called Non-Interactive Mode


The link does say on how to create a management user in non-interactive mode but it does not solve my problem where I need to obtain the secret value to be used for connecting to another jboss server as the non-interactive mode only creates the management user but does not provide the secret value.

There is an application user example below, if it helps. If not, you need to dig into the script and see how it calls the question and possibly use expect or something similar to send the yes answer to the script


Is there any solution for the original question? Non-interactive mode is not displaying secret value for the management user. I am yet to dig into script. If there is any solution already available please post here.

Hi Joseph,

I have the same issue with non-interactive mode. One possible solution I found by looking the source code is the following:

The class generating the secret value is "" and the method that generates the code, does a Base64 encoding on the password only.

 public State execute() {
        String pwdBase64 = Base64.encodeBytes(stateValues.getPassword().getBytes());

        // This is now the final state so return null.
        return null;

I am thinking of writing a custom utility to encode the password and then use it in my hosts.xml. The Base64 implementation is org.jboss.util.Base64 and not java.util.Base64.

I hope this helps.

Kind regards,



Please create a script as mentioned below.

Script Start

./ $1 $2

sleep 3

echo -n $2|base64

Script End

Run the script as ./script_name username password