The J2EETM Tutorial
Home
TOC
Index
PREV TOP NEXT Search
Feedback

Realm Tool

The realmtool utility is a command-line script that enables you to add and remove J2EE users and to import certificate files.

Table B-4 realmtool Options 
Option
Description
-show
Lists the realm names.
-list <realm-name>
Lists the users in the specified realm. This release has two realms: default and certificate.
-listGroups
Lists the groups in the default realm.
-userGroups <user-name>
Lists the groups in the default realm to which the specified user belongs.
-add <user-name password
group[,group]>
Adds the specified user to the default realm.
-addGroup <group>
Adds a group to the default realm.
-import <certificate-file>
Adds a user to the certificate realm by importing a file containing an X.509 certificate.
-remove <realm-name user-name>
Removes a user from the specified realm.
-removeGroup <group>
Removes a group.

Examples

To display all users in the default realm, type this command:

realmtool -list default
 

To add a user to the default realm you specify the -add flag. The following command will add a user named robin who is protected by the password red, and will include robin in the bird and wing groups:

realmtool -add robin red bird,wing
 

To add a user to the certificate realm, you import a file containing the X.509 certificate that identifies the user:

realmtool -import certificate-file
 

To remove a user, you specify the -remove flag. For example, to remove a user named sparrow from the default realm, you would type the following command:

realmtool -remove default sparrow
 

To add a group to the default realm you specify the -addGroup flag. The following command adds the wing group:

realmtool -addGroup wing
 

(You cannot add a group to the certificate realm.)

To remove a group from the default realm, you specify the -removeGroup flag:

realmtool -removeGroup wing
 
Home
TOC
Index
PREV TOP NEXT Search
Feedback