Could not expand event when adding user which contains exclamation sign in the password

Solution Unverified - Updated -

Issue

  • The following error occurs when trying to add a user account which has an exclamation sign in the password:

Steps to replicate:

  1. Login to Karaf shell ./bin/client - u admin
  2. jaas:useradd test hello!world
[ERROR] Could not expand event
java.lang.IllegalArgumentException: !world: event not found
        at jline.console.ConsoleReader.expandEvents(ConsoleReader.java:779)
        at jline.console.ConsoleReader.finishBuffer(ConsoleReader.java:631)
        at jline.console.ConsoleReader.accept(ConsoleReader.java:2019)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:2666)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:2269)
        at org.apache.karaf.shell.console.jline.Console.readAndParseCommand(Console.java:270)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:193)
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:173)
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:125)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:123)

Environment

  • Red Hat JBoss Fuse
    • 6.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content