Introduction
This article will show how to add a new user in order to be able to login to Wildfly Management Admin Console page. So, at first, after the installation of the Wildfly Application Server, to be able to login to the Wildfly Management Admin Console is really important. Actually, there is a default user exist with the name of ‘admin’. It is a management user which is disabled by default. So, the aim of this article is to show how to add another user. That user will have another name. The following is the execution of the command for creating a new user :
[admin@10 bin]$ sh 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
Since it is a user for further management role, create a management user by entering ‘a’ as in the above display. Do not forget to type enter after.
Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : administrator
In this article, the example is using quite similar name with the default ‘admin’ user. It is a management user with the name of ‘administrator’. As usual, do not forget to type enter after.
The username 'administrator' is easy to guess Are you sure you want to add user 'administrator' yes/no? yes
Just use it as is although there is a complain for the usage which is considered as an easy username to be guessed. Just type ‘yes’ to use it and ignoring the warning. In order to accept it, do not forget to type enter after also.
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file. - The password should be different from the username - 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) Password :
Before inserting the password for the current user to finish the process for adding a new user, there are several password recommendations exist above. It is a recommendation as a guide to create a secure password. Just type the password and then do not forget to type enter.
WFLYDM0098: The password should be different from the username Are you sure you want to use the password entered yes/no? yes
Actually, there is another warning as it exist in the above output command. It is because the entered password is exactly the same with the username. This is just for an example and in the real situation, just try to create a more secure password. Just type ‘yes’ to accept that password condition.
Re-enter Password :
The next step is to retype the password again as in the above line and end it by typing enter. And the following line will appear :
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 'administrator' for realm 'ManagementRealm' Is this correct yes/no? yes
In the above line of output command, just type ‘yes’ to add the user ‘administator’ to ‘ManagementRealm’. So, the following output command will appear :
Added user 'administrator' to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-users.properties' Added user 'administrator' to file '/home/admin/wildfly-23.0.2.Final/domain/configuration/mgmt-users.properties' Added user 'administrator' with groups to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-groups.properties' Added user 'administrator' with groups to file '/home/admin/wildfly-23.0.2.Final/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 Jakarta Enterprise Beans calls. yes/no? * Error * WFLYDM0029: Invalid response. (Valid responses are yes, y, no and n) 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 Jakarta Enterprise Beans calls. yes/no? yes
Finally, in order to finish all of the process for adding a new user, just type ‘yes’ and do not forget to type enter in the end.
To represent the user add the following to the server-identities definition [admin@10 bin]$
In that case, as the output of the above appear, the process for adding a new user is a success.