Sun GlassFish Enterprise Server v2.1.1 Troubleshooting Guide

ProcedureTo remove the user name and password completely

  1. Stop the server, if it is currently running.

  2. Change to the appropriate WEB-INF directory; for example:

  3. Comment out the entire <security-constraint\> element in the web.xml file.

    Do not delete the element, as you will be reenabling it later. This action disables security for command-line operations.

    Note –

    The commands will still expect a value for --username (or -u) and --password (or -w). But these can be dummy values, since the server side does not impose any security.

  4. Start the server.

    At this point, the server does not have command-line security.

  5. Run the following command:

    asadmin create-file-user --user <dummy\> --password <dummy\>
     --userpassword <new_secret\> --groups asadmin <new_user_id\>

    This command creates the following new entry:

  6. Uncomment the <security-constraint\> element in web.xml file.

  7. Restart the server for the new user name-password to take effect.

    Note –

    When the server is started, any remote command-line operations will need new_user_id and new_secret as user name and password.