When you install a Magnolia CMS .war file onto GlassFish application server, everything will work until you need to do something which requires authentication such as logging in to AdminCentral. The reason for this is that Magnolia needs custom authentication modules to be declared to allow it to handle its own users and authentication.
To do this, edit
login.conf file for the GlassFish domain you are deploying on. The domain is
domain1 if you are using the out-of-the-box GlassFish setup. I have not yet found a way to do this through the GlassFish Administration Console so you need to edit the file. Assuming your domain is
domain1 then the path to the file within your GlassFish app folder
Add the following lines at the end of the file:
This was successfully tested on Magnolia 4.4.4 on Glassfish 3.1.1. Thanks to user "huggy77" on the Ubuntu forums for this advice (though note that the code on the forum page actually has an error in it so copy from here instead).