Introduction
Like the previous article, this article is also an article for showing how to handle a warning message appear when adding a new user in Wildfly Application Server. In order to be able to login to the Wildfly Management Admin Console page, having a username with its password is a necessary. The subject exist as in the article with the title of ‘How to Add New User to Login to Wildfly Management Admin Console in Linux CentOS’ in this link.
It also exist in another article where has the same content on updating or resetting the password of an existing user. The title of the article is ‘How to Reset Admin Password to Login to Wildfly Management Admin Console in Linux CentOS 8’ and it exist in this link. Another article which has the similar content exist in this link. It is an article with the title of ‘How to Solve Warning Message The password should be different from the username when adding or updating user in Wildfly Application Server’. The following is the actual process for executing a command on adding a new user and the warning message appear :
[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’ and type ‘Enter’ the following after. Another output command will appear as follow :
Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : admin
Just type ‘admin’ to add a new user. Or type any other username. In case of entering the username of ‘admin’, the following output of the command execution will appear :
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
In this context, just type the letter ‘a’ to update the password of the user. The user is already exist which is the user with the name of ‘admin’. After typing ‘Enter’, 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 : WFLYDM0101: Password should have at least 1 digit. Are you sure you want to use the password entered yes/no?
What is actually happen is because the password and the username is actually the same. The above warning message appear because the entered password value is ‘password’. So, it will generate the warning message because there is no digit number at all.
Handling the Warning Message
In order to handle the warning message as exist in the previous part, just type yes in order to use that kind of password. So, the a warning describe the usage of the password which does not have any digit number at all. In order to allow the usage of that kind of password fort he user, just enter ‘yes’ in the above output command. So, the following is the actual continuation of the output :
... Password : WFLYDM0101: Password should 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)[ ]: 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]$
Furthermore, if there is a decision to use a different password, just type ‘no’ as the input. After typing ‘no’ in the above output command, the following output will appear :
... Password : WFLYDM0098: The password should be different from the username Are you sure you want to use the password entered yes/no? no 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 :
The above process is for entering the password. It is either for the existing user for updating purpose or creating a new user. It is repeatable by itself depends on the user’s input. In order to finish the process, just change the value of the password into something else. The previous one is ‘password’. In other words, in order to fulfill the requirement of the password, just change it into something else. Type Enter afterwards and the following output will appear :
Re-enter Password : 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 '/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]$
Just test it after setting the password for the new user or updating the password for the existing user. Try it by logging in into the Wildfly Admin Management console page.