You have two options:
- Create $HOME/.asadminpass:
- Or you can pass the file with the password with every asadmin command:
- Create glassfisg.password file:
- If you are on Linux it is a good idea to make the file readable only to your user:
chmod 600 glassfish.password
- Execute asadmin command:
$com.sun.aas.installRoot/bin/asadmin --user admin --passwordfile PATH_TO_PASSWORD_FILE list-applications
$HOME is a home directory of a user under which Glassfish is running.
$com.sun.aas.installRoot is the installation directory of Glassfish. It is only set on a Glassfish process.