此内容没有您所选择的语言版本。
4.3. Add-user Script Command Line Examples
Example 4.1. Create a user belonging to a single group
EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest'
EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest'EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest'
This example gives the following results.
- The user
appuser1
is added to the following default properties files that store user information.EAP_HOME/standalone/configuration/application-users.properties
EAP_HOME/domain/configuration/application-users.properties
- The user
appuser1
with groupguest
is added to the default properties files that store group information.EAP_HOME/standalone/configuration/application-roles.properties
EAP_HOME/domain/configuration/application-roles.properties
Example 4.2. Create a user belonging to multiple groups
EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest,app1group,app2group'
EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest,app1group,app2group'EAP_HOME/bin/add-user.sh -a -u 'appuser1' -p 'password1!' -g 'guest,app1group,app2group'
This example gives the following results.
- The user
appuser1
is added to the following default properties files that store user information.EAP_HOME/standalone/configuration/application-users.properties
EAP_HOME/domain/configuration/application-users.properties
- The user
appuser1
with groupsguest
,app1group
, andapp2group
is added to the default properties files that store group information.EAP_HOME/standalone/configuration/application-roles.properties
EAP_HOME/domain/configuration/application-roles.properties
Example 4.3. Create a user with Administrator privileges in the Default Realm
EAP_HOME/bin/add-user.sh -u 'adminuser1' -p 'password1!' -g 'admin'
EAP_HOME/bin/add-user.sh -u 'adminuser1' -p 'password1!' -g 'admin'EAP_HOME/bin/add-user.sh -u 'adminuser1' -p 'password1!' -g 'admin'
This example gives the following results.
- The user
adminuser1
is added to the following default properties files that store user information.EAP_HOME/standalone/configuration/mgmt-users.properties
EAP_HOME/domain/configuration/mgmt-users.properties
- The user
adminuser1
with groupadmin
is added to the default properties files that store group information.EAP_HOME/standalone/configuration/mgmt-groups.properties
EAP_HOME/domain/configuration/mgmt-groups.properties
Example 4.4. Create a user belonging to single group using alternate properties files
EAP_HOME/bin/add-user.sh -a -u appuser1 -p password1! -g app1group -sc /home/someusername/userconfigs/ -up appusers.properties -gp appgroups.properties
EAP_HOME/bin/add-user.sh -a -u appuser1 -p password1! -g app1group -sc /home/someusername/userconfigs/ -up appusers.properties -gp appgroups.properties EAP_HOME/bin/add-user.sh -a -u appuser1 -p password1! -g app1group -sc /home/someusername/userconfigs/ -up appusers.properties -gp appgroups.properties
This example gives the following results.
- The user
appuser1
is added to the following properties file and that file is now the default file to store user information./home/someusername/userconfigs/appusers.properties
- The user
appuser1
with groupapp1group
is added to the following properties file and that file is now the default file to store group information./home/someusername/userconfigs/appgroups.properties