Instead of typing the password at the command line, you can access the password for a command from a file such as passwords.txt. The --passwordfile option of the asadmin utility takes the name of the file that contains the passwords. The entry for a password in the file must have the AS_ADMIN_ prefix followed by the password name in uppercase letters.
The following other types of passwords can be specified:
AS_ADMIN_MASTERPASSWORD AS_ADMIN_USERPASSWORD AS_ADMIN_ALIASPASSWORD
Edit the password file.
For example, to specify the password for the domain administration server (DAS), add an entry similar to the following to the password file, where adminadmin is the administrator password:
Save the password file.
Specify the password file in an asadmin command.
asadmin delete-jdbc-resource --user admin --password passwords.file jdbc/DerbyPool
If AS_ADMIN_PASSWORD has been exported to the global environment, specifying the --passwordfile option will produce a warning about using the --passwordfile option. To prevent this warning situation from happening, unset AS_ADMIN_PASSWORD.