The WSIT Tutorial

Adding Users to GlassFish

This section describes the following tasks:

ProcedureTo Add Users to GlassFish Using the Admin Console

To add users to GlassFish using the Admin Console, follow these steps.

  1. Start GlassFish if you haven’t already done so.

  2. Start the Admin Console if you haven’t already done so.

    You can start the Admin Console by starting a web browser and specifying the URL http://localhost:4848/asadmin. If you changed the default Admin port during installation, type the correct port number in place of 4848.

  3. To log in to the Admin Console, type the user name and password of a user in the admin-realm who belongs to the asadmin group.

    The name and password entered during installation will work, as will any users added to this realm and group subsequent to installation.

  4. Expand the Configuration node in the Admin Console tree.

  5. Expand the Security node in the Admin Console tree.

  6. Expand the Realms node, then select the file realm.

  7. Click the Manage Users button.

  8. Click New to add a new user to the realm.

  9. Type the correct information into the User ID, Password, and Group(s) fields.

    The example applications reference a user with the following attributes:

    • User ID = wsitUser

    • Group List = wsit

    • New Password = changeit

    • Confirm New Password = changeit

  10. Click OK to add this user to the list of users in the realm.

  11. Click Logout when you have completed this task.

ProcedureTo Add Users to GlassFish From the Command Line

  1. Make sure GlassFish is running, then type the following command:

    as-install/asadmin create-file-user --groups wsit wsitUser
  2. When you are prompted for the password, type changeit.