How to Login to Wildfly Management Admin Console after Installation

Posted on

Introduction

This is an article where the main content is just to show how to be able to login to Wildfly Management Admin Console. Basically, after the installation of a Wildfly Application Server, it is important to be able to login to Wildfly Management Admin Console. Actually, it is impossible to login to Wildfly Management Admin Console without performing several steps in the first place. The following is an image appear when accessing the Wildfly Management Admin Console page after the installation :

How to Login to Wildfly Management Admin Console after Installation
How to Login to Wildfly Management Admin Console after Installation

So, the Wildfly Management Admin Console does not display any means for logging in to it. It does not presenting any login form or any pop-up windows to receive login information. On the other hand, it is actually giving an information about how to solve it. The information exists as follows :

However you have not yet added any users to be able to access the admin console.

Solution

Basically, the solution exist in the error message available in the previous part. Just add a new user. And in order to add a new user, there are several alternatives along the way. The first one is just normally create a new user. Another alternative is just an alternative exist by enabling and also updating the existing user. Both of those options will be available below.

Adding a new user

In order to add a new user, just execute the file with the name of ‘add-user.sh’ exist in the ‘bin’ folder. In this context, the ‘bin’ folder exist inside the root folder of the Wildfly Java Application Server. So, execute the file shell script to add user as follows :

[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

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : administrator
The username 'administrator' is easy to guess
Are you sure you want to add user 'administrator' yes/no? yes
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 :
WFLYDM0098: The password should be different from the username
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 'administrator' for realm 'ManagementRealm'
Is this correct yes/no? yes

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
To represent the user add the following to the server-identities definition 
[admin@10 bin]$
[admin@10 bin]$

Finally, the process for adding a new user is finished. Last but not least, refresh the page for accessing Wildfly Application Console. After that, try to login using the new user information.

Enable existing user

Another alternative is updating the existing users. In order to update an existing user, just execute the same command. It is a shell script with the name of ‘add-user.sh’ as follows :

[admin@10 bin]$ chmod +x add-user.sh
[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

Just insert or type ‘a’ to add a new Management User. The following output will appear after typing the enter command following letter ‘a’ as follows :

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): b

From the above output command, there is already an existing user with the name of ‘admin’. So, instead of adding a new one, just use enable the existing user.  Just type ‘b’ and then type enter. Soon after, the following output command will appear :

Updated user 'admin' to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-users.properties'
Updated user 'admin' to file '/home/admin/wildfly-23.0.2.Final/domain/configuration/mgmt-users.properties'
Updated user 'admin' with groups null to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-groups.properties'
Updated user 'admin' with groups null to file '/home/admin/wildfly-23.0.2.Final/domain/configuration/mgmt-groups.properties'
[admin@10 bin]$

Actually enabling the user ends into one additional problem. There is a user exist with the name of ‘admin’. Although the user with the name of ‘admin’ is currently enabled, there is no information about the password for that user. So, after enabling the user, in order to login to the Wildfly Admin Management Console, just update that existing user. The following part is a part for updating the existing user.

Update Existing User

This part is actually the continuation from the previous part. It completes the previous part which is aiming to enable user. Maybe there is a way to find the password of an already enabled user with the name of ‘admin’. In case there is not even way to find it, just update it. So, the final part is a part to complete the update existing user. Updating the user is very useful to reset the password of the already enabled user. So, in order to update it, just add the execute the script with the name of ‘add-user.sh’. as follows :

[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

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 enabled, would you like to...
 a) Update the existing user password and roles
 b) Disable the existing user
 c) Type a new username
(a): 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 :
WFLYDM0098: The password should be different from the username
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)[PowerUser,BillingAdmin,]:
Updated user 'admin' to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-users.properties'
Updated user 'admin' to file '/home/admin/wildfly-23.0.2.Final/domain/configuration/mgmt-users.properties'
Updated user 'admin' with groups  to file '/home/admin/wildfly-23.0.2.Final/standalone/configuration/mgmt-groups.properties'
Updated user 'admin' 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? yes
To represent the user add the following to the server-identities definition
[admin@10 bin]$

Leave a Reply