As we have discussed on previous post about how to install GlassFish 4.1 on Linux system if you may get an error when you are panel Login, Configure Secure Admin Access. Run ./asadmin, then enter the user name and password.



We know GlassFish installed path /usr/local/glassfish4
 

# cd /usr/local/glasshfish4/bin

# ./asadmin

Use "exit" to exit and "help" for online help.

asadmin> change-admin-password

Enter admin user name [default: admin]>admin
Enter the admin password>
Enter the new admin password> [enter your new password]
Enter the new admin password again> [enter your new password again]
Command change-admin-password executed successfully.

To enable secure admin run the below command,

asadmin>enable-secure-admin

Enter admin user name>  admin
Enter admin password for user "admin">


You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.

asadmin> stop-domain

Waiting for the domain to stop .
Command stop-domain executed successfully.


asadmin> start-domain

Waiting for domain1 to start .....................
Successfully started the domain : domain1
domain  Location: /usr/local/glassfish4/glassfish/domains/domain1
Log File: /usr/local/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

 
# ./asadmin list-file-users --authrealmname admin-realm

...
admin
Command list-file-users executed successfully.

asadmin> exit
Command multimode executed successfully.


Now, you can login into Glassfish admin panel on browser without any errors.