Duplicate records are registered to mgmt-groups.properties or application-roles.properties

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Issue

Duplicate records are registered to mgmt-groups.properties or application-roles.properties when adding an user with an empty group name as follows.

Use -g option with an empty string when adding an user by add-user.sh.

$JBOSS_HOME/bin/add-user.sh -sc ./standalone/configuration/ -u testuser2 -p password -g ""

Or in the interactive-mode, set to blank for the group name answer.

$JBOSS_HOME/bin/add-user.sh -sc ./standalone/configuration

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a or b
...

What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]:
// set BLANK

After that, mgmt-groups.properties / application-roles.properties will have the duplicate records as follows.

testuser1=
testuser2=
testuser1=

Resolution

You can remove the duplicate records manually when EAP stopped.
Or use non-interactive mode without -g option unless you need to set a group.

$JBOSS_HOME/bin/add-user.sh -sc ./standalone/configuration/ -u <username> -p <password>

In this case, the user record will not be registered in the group/role property file.
(It is the same as registering an user name with empty group.)

Root Cause

This issue is discussed in the following JIRAs:

Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.