Summary: By default, Red Hat JBoss Enterprise Application Platform is distributed with security enabled for the management interfaces. A few of the quickstarts use these management interfaces and require that you create a management or application user to access the running application. An add-user
script is provided in the EAP_HOME/bin
directory for that purpose. You can run the script interactively or you can pass arguments on the command line.
The following procedures describe how to add a user with the appropriate permissions to run the quickstarts that depend on them.
Note: Passwords must meet the following requirements:
- It can not be the same as the user name.
- It must contain at least 8 characters.
- It must contain at least one alphanumeric character.
- It must contain at least one digit.
- It must contain at least one non-alphanumeric symbol.
Foe more information about how to configure users, see the Product Documentation for Red Hat JBoss Enterprise Application Platform.
NOTE: See Use of EAP_HOME for information about the JBoss EAP installation path.
You can pass arguments on the command line or you can run the script interactively. The examples below use "admin" for the Username
and "adminPass1!" for the Password
. If the quickstart requires a specific Username
and Password
, be sure to replace them in the examples below.
You can create the management user non-interactively by passing each argument on the command line.
For example, to add the Management User admin
in the default ManagementRealm
realm with password adminPass1!
,
open a command prompt and type the following:
For Linux: EAP_HOME/bin/add-user.sh -u 'admin' -p 'adminPass1!'
For Windows: EAP_HOME\bin\add-user.bat -u 'admin' -p 'adminPass1!'
If you prefer, you can create the management user interactively.
-
Open a command prompt.
-
Type the command for your operating system
For Linux: EAP_HOME/bin/add-user.sh For Windows: EAP_HOME\bin\add-user.bat
-
You should see the following response:
What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a):
At the prompt, press enter to use the default Management User.
-
You should see the following response:
Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username :
-
Enter the Username and, at the next prompt, enter the Password.
Username : admin Password : (choose a password for the admin user)
Repeat the password.
-
At the next prompt, you will be asked "What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: ". Leave it blank and press enter.
-
Choose yes for the remaining prompts.
You can pass arguments on the command line or you can run the script interactively. The examples below use "quickstartUser" for the Username
, "quickstartPwd1!" for the Password
, and "guest" for the group. If the quickstart requires a specific Username
, Password
, or group
, be sure to replace them in the examples below.
You can create the application user non-interactively by passing each argument on the command line.
The default application user for the quickstarts is quickstartUser
, in the ApplicationRealm
realm, with password quickstartPwd1!
, and belonging to group guest
.
To add the default application user, open a command prompt and type the following:
For Linux: EAP_HOME/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest'
For Windows: EAP_HOME\bin\add-user.bat -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest'
If you prefer, you can create the application user interactively.
-
Open a command prompt.
-
Type the command for your operating system
For Linux: EAP_HOME/bin/add-user.sh For Windows: EAP_HOME\bin\add-user.bat
-
You should see the following response:
What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a):
At the prompt, type:
b
-
You should see the following response:
Enter the details of the new user to add. Using realm 'ApplicationRealm' as discovered from the existing property files. Username :
-
Enter the the Username and at the next prompt, enter the Password. If the quickstart README specifies a Username and Password, enter them here. Otherwise, use the default Username
quickstartUser
and PasswordquickstartPwd1!
.Username : quickstartUser Password : quickstartPwd1!
-
At the next prompt, you will be asked "What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: ". If the quickstart README specifies the groups to use, enter that here. Otherwise, type the group:
guest