How to set username and password in JBoss

Unfortunately, their Wiki does not work for maintenance, and the Internet does not help.

How to add a new user to JBoss so that I can log in.

In Tomcat, you change the tomcat-users.xml file. It seems that in the config jboss folder there is a similar file called login-config.xml.

It has something to do with this file or something else in general.

+4
source share
3 answers

In the users.properties file inside jboss \ server \ default \ conf \ props

+6
source

As @Ankur said you need to configure files in jboss \ server \ default \ conf \ props

I think you want to configure admin console users. Therefore, you need to add one line with your username and password to the jmx-console-users.properties file (for example: username = password => jbatista = portuguese).

It is important that you do not forget to add the role to the user created above / privileges. Like tomcat or any other application server, users have one or more roles, and roles have permissions. In this case, we want the jbatista user to have the JBossAdmin role so that he can deploy the WAR, etc. As with the case of adding a user, we must add another line of input. But instead of jmx-console-users.properties we add the line jbatista = JBossAdmin (username = role) to the jmx-console-roles.properties file

+1
source

You can add a user through the CLI in Jboss AS 7, which, in turn, is stored in mgmt -users.properties in the JBOSS_HOME / domain / configuration and in the JBOSS_HOME / Standalone / configuration / directory.

I have an ubuntu system, but the step of adding a user is the same via cli:

  • Via terminal, navigate to the bin directory path in Jboss7
  • type./add-user.sh
  • Then create the type of user you want.

This link will help you and explain in detail the details:

http://www.mastertheboss.com/jboss-as-7/adding-users-with-jboss-as-7

Note : for windows you need to run the add-user.bat file instead of .sh

0
source

All Articles