How to Solve Warning Message The password should be different from the username when adding or updating user in Wildfly Application Server

Posted on

Introduction

This article is showing how to handle a warning message appear when adding a new user in Wildfly Application Server. The main reason for adding a new user is to be able to login to the Wildfly Management Admin Console page. It 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.

Another reason is for resetting the password of an existing user. Actually, it also exist in article with the title of ‘How to Reset Admin Password to Login to Wildfly Management Admin Console in Linux CentOS 8’ in this link. 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 :
WFLYDM0098: The password should be different from the username
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 ‘admin’.

Handling the Warning Message

So, continue on the previous part, just type yes in order to use that kind of password. It is actually just a warning where the usage of the password which is the same with the username in the above case is allowed. In case of entering ‘yes’ in the above output command, the following is the continuation of the output :

...
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)[  ]:
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]$

But if there is a decision to use a different password, just type ‘no’ instead. In case of entering ‘no’ in the above output command, the following is the continuation of the output :

...
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 :

It will actually repeat the process. So, change the value of the password into something else. The previous one is ‘admin’. In order to fulfill the requirement change it into something else. Following after, type Enter. 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]$

Last but not least, test it by logging in into the Wildfly Admin Management console page.

Leave a Reply