Introduction
Another article showing how to be able to do something. Specifically, it is an article which is showing about how to create a user in Wildfly Application Server. The Wildfly Application Server exist in a PC, laptop or machine which is using a Microsoft Windows operating system. After running a Wildfly Application Server from NetBeans IDE and it is properly running, there is a problem for accessing the management page of the Wildfly Application Server. Using it at the first time, there is no default user available for accessing it. So, create a new user is the only way to be able to login to the management page of the Wildfly Application Server.
Create user to access Wildfly Application Server’s Management Page
Actually, the step is very simple, just do it in the following sequence :
-
First of all, just access the Command Prompt. The following is the appearance of the content of the Command Prompt :
Microsoft Windows [Version 10.0.18363.628] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\Personal>
-
Continue on the previous process, just access the Wildfly binary folder as follows :
Microsoft Windows [Version 10.0.18363.628] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\Personal>cd c:\wildfly-21.0.2.Final\bin c:\wildfly-21.0.2.Final\bin>
-
Next, just type the bat command file for creating a new user as follows :
Microsoft Windows [Version 10.0.18363.628] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\Personal>cd c:\wildfly-21.0.2.Final\bin C:\wildfly-21.0.2.Final\bin>add-user.bat What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : admin User 'admin' already exists and is disabled, would you like to... a) Update the existing user password and roles b) Enable the existing user c) Type a new username (a): 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 : WFLYDM0101: Password should have at least 1 digit.
The above process displaying the input ‘Password :’. It is asking for the password of the user user. In this case, the attempt is by inserting the keyword ‘password’. That actually trigger a warning message informing that the password must contain 1 digit.
Are you sure you want to use the password entered yes/no? yes
The above is also another question as a display to confirm on using that kind of password. Just type ‘yes’ if that password is not a problem.
Re-enter Password :
Following after, just enter the same password character as the ‘Re-enter Password :’ input appear in the display output.
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: Updated user 'admin' to file 'C:\wildfly-21.0.2.Final\standalone\configuration\mgmt-users.properties' Updated user 'admin' to file 'C:\wildfly-21.0.2.Final\domain\configuration\mgmt-users.properties' Updated user 'admin' with groups to file 'C:\wildfly-21.0.2.Final\standalone\configuration\mgmt-groups.properties' Updated user 'admin' with groups to file 'C:\wildfly-21.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 EJB calls. yes/no? yes To represent the user add the following to the server-identities definition <secret value="cGFzc3dvcmQ=" /> Press any key to continue . . . C:\wildfly-21.0.2.Final\bin>