[jboss-jira] [JBoss JIRA] (WFLY-2305) add-user utility reports "No java.io.Console available to interact with user." when used silently with su and piped to a file.

Darran Lofthouse (JIRA) jira-events at lists.jboss.org
Tue Oct 15 10:17:35 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12814208#comment-12814208 ] 

Darran Lofthouse commented on WFLY-2305:
----------------------------------------

The actual problem here is that --silent=true is not a valid argument, the valid argument is --silent 

{noformat}
[darranl at localhost bin]$ ./add-user.sh --help
Usage: ./add-user.sh [args...]
where args include:
    -a                                  If set add an application user instead 
                                        of a management user

    -dc <value>                         Define the location of the domain 
                                        config directory.

    -sc <value>                         Define the location the server config 
                                        directory.

    -up, --user-properties <value>      The file name of the user properties 
                                        file which can be an absolute path.

    -g, --group <value>                 Comma-separated list of groups for the 
                                        user.

    -gp, --group-properties <value>     The file name of the group properties 
                                        file which can be an absolute path. (If 
                                        group properties is specified then user 
                                        properties MUST also be specified).

    -p, --password <value>              Password of the user. Should not be 
                                        same as the username

    -u, --user <value>                  Name of the user

    -r, --realm <value>                 Name of the realm used to secure the 
                                        management interfaces (default is 
                                        "ManagementRealm")

    -s, --silent                        Activate the silent mode (no output to 
                                        the console)

    -e, --enable                        Activate the silent mode (no output to 
                                        the console)

    -d, --disable                       Activate the silent mode (no output to 
                                        the console)

    -cw, --confirm-warning              Automatically confirm warning in 
                                        interactive mode

    -h, --help                          Display this message and exit
{noformat}

I will add unofficial support for an argument --silent=true.
                
> add-user utility reports "No java.io.Console available to interact with user." when used silently with su and piped to a file.
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-2305
>                 URL: https://issues.jboss.org/browse/WFLY-2305
>             Project: WildFly
>          Issue Type: Bug
>          Components: Domain Management, Security
>    Affects Versions: 8.0.0.Beta1
>         Environment: WildFly snapshot of master 15-oct-2013
>            Reporter: Tom Fonteyne
>            Assignee: Darran Lofthouse
>             Fix For: 8.0.0.CR1
>
>
> Running add-user.sh in silent mode and redirecting the output to a file results in an exception:
> Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list