We have a requirement to run some JBoss/Wildfly CLI commands.
How can we complete this if you cannot login to the CLI or edit command line config files?
Component : CA IDENTITY SUITE (VIRTUAL APPLIANCE)
You can access the Wildfly/JBoss CLI with a user you create in the 'ManagementRealm.'
Use add-user.sh to create the user.
Below is an example of creating a user 'testuser' but you can use any username.
config@testuser-vapp-145ga VAPP-14.5.0 (XX.XX.XX.XXX):/opt/CA/wildfly-idm/bin > sudo /opt/CA/wildfly-idm/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : testuser
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
- The password should not be one of the following restricted values {root, admin, administrator}
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
- The password should be different from the username
Password :
JBAS015266: Password must have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:
About to add user 'testuser' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'testuser' to file '/opt/CA/wildfly-idm/standalone/configuration/mgmt-users.properties'
Added user 'testuser' to file '/opt/CA/wildfly-idm/domain/configuration/mgmt-users.properties'
Added user 'testuser' with groups to file '/opt/CA/wildfly-idm/standalone/configuration/mgmt-groups.properties'
Added user 'testuser' with groups to file '/opt/CA/wildfly-idm/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a remoting connection for server-to-server EJB calls.
yes/no? no
Now you have the new user testuser associated with the Management Realm and with the new user's access you can run jboss-cli.sh.