Sun GlassFish Enterprise Server v3 Prelude 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:


    as-install/lib/install/applications/adminapp/adminapp_war/WEB-INF
  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. Create a plain text file that defines the AS_ADMIN_USERPASSWORD variable as follows:


    AS_ADMIN_USERPASSWORD=adminpassword
    
    adminpassword

    Your choice of password for the administration user's password.

  6. Create an administration user whose password is the password that you defined in the preceding step.


    asadmin create-file-user --groups asadmin --passwordfile=password-file adminuser
    
    passwordfile

    The full path to the file that you created in the previous step.

    adminuser

    The name of the user that you are creating.

    This command adds an entry to the as-install/domains/domain-name/config/keyfile file.

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

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


    Note –

    After the server is restarted, remote commands must specify adminuser as the administration user and adminpassword as the administration password.