Introduction
This article will show how to reset an admin user’s password to be able to login to the Wildfly Management Admin Console page. Actually, at first, after installing Wildfly Application Server, this is a necessary task. Someone, in this context, the admin need to be able to access the Wildfly Management Admin Console page. But if in some circumstances where the password is lost, there is a way to reset it as long as the username is exist. So, accessing the Wildfly Management Admin Console page directly without creating a user in the first place will generate an error. The error appear in the Wildfly Management Admin Console page as follows :
Solution
Basically, the solution is very simple. Just create a new user or enable the existing one. Creating a new user is possible by adding a new user. Just read the article with the title of ‘How to Add New User to Login to Wildfly Management Admin Console in Linux CentOS’ in this link. But in this case, the solution is just to reset the password of an existing user. It is by resetting the admin user’s password. The information exist in an article exist in this link with the title of ‘How to Login to Wildfly Management Admin Console after Installation’. Just follow the step in that link. But in general, the following is the step for achieving the purpose :
[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 input the letter ‘a’ to add a new user with the type of Management User. The following output will appear :
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
By the time adding a new user with the name of ‘admin’, it is already exist. But since it is the first time after the installation, there is no default password for username ‘admin’ available. So, type and input the letter ‘a’ to update the existing user password and roles. But most important thing is for updating the password for the existing user with the name of ‘admin’. After inserting the letter ‘a’, the following output will appear :
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
The reason for the above output appear is because the inserted password is ‘admin’. It is the same with the username’s name. Although it triggers the warning message ‘WFLYDM0098: The password should be different from the username’, just type ‘yes’ to accept it.
Re-enter Password :
Soon after, the above output appear for inserting the password once more. After that type enter and the following output will appear :
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]$
At the end of the execution above, the process for resetting the password is actually a success. Just try to access the Wildfly Management Admin Console page once more. Use user ‘admin’ and the password as in the above reset process.