Skip to main content

Removal of --password from asadmin command line ...

4 replies [Last post]
Joined: 2005-04-04

This is to let you know that we are removing the support for asadmin --password and --adminpassword on 02/15/2006. Thus any GlassFish administration/configuration command will cease to work if a password in clear is presented after using --password on it.

For example, "asadmin deploy --user admin --password adminadmin foo.ear" will start generating error.

I had sent an e-mail to dev@glassfish and users@glassfish a week ago.

This is a heads up, so that you can modify your automated scripts accordingly. The migration path is to use --passwordfile instead of --password.

To improve the usability, when the support will actually be removed, an asadmin login command will be introduced, such that when the admin client "logs" in to a domain, the password will be stored locally for asadmin to use for subsequent configuration of that domain.

asadmin, asant tasks, documentation, online help, bundled documentation is expected to change to react to this.

Note that this is applicable only to GlassFish TRUNK builds, not the BETA builds. The BETA builds are not affected by this change.

All of this (motivation, details) and more is available at:

for your perusal.

Let us know if there are any issues that you see with this.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-13

Ok, it happened...and my Ant script does weird stuff.

I run

asant login

I get ~/.asadminpass as advertised.

I can run

asant deploy myapp.ear

and my app is deployed. No password prompt is necessary. Ok. But...

gives an error message

A password or password file must be specified in the sun-appserv-deploy element or in each server subelement. A password or password file for host (localhost) was not specified.

Well then...

user="admin" passwordfile="/home/cay/.asadminpass"/>

It deploys, but I get this ominous message:

Options specified in passwordfile are either invalid or deprecated. Passwordfile can only be used to specify values for password options. Use of passwordfile to specify values for other options is deprecated. Passwordfile should contain the following format AS_ADMIN_

Here is the contents of the .asadminpass file:

# Do not edit this file by hand. Use login interface instead.
asadmin://admin@localhost:4848 YWRtaW5hZG1pbg==

Is this a bug, erm, regression? Or am I doing something wrong?



Joined: 2005-04-04

This seems to be a regression in asant. I will find out.

Sorry to be cryptic, but the caveat is that .asadminpass file is different from passwordfile. The passwordfile option is a traditional feature of the app server. The format of that file is different from .asadminpass file that we introduced with b38.

For now, can you please do the following workaround:
- create a file with a name, say "passfile"
- add the following to this file:
- provide the path of this file on sun-appserv-deploy ant target.

Please let me know if it works.

If possible, file a bug and I'll get it fixed.

Joined: 2003-06-13

Thanks for the super-fast reply!

That did the trick:

user="admin" passwordfile="passfile"/>

So much safer than the old way :-)

I suspect you'll want to fix sun-appserv-deploy to read the encrypted password file, or even better to collaborate with asadmin login. I think it would be better if you filed the bug since I don't know exactly what behavior one wants.



Joined: 2005-04-04

Good. Thanks for letting me know that it works.

This is what I am wondering about. asadmin login should have been recognized by asant (i.e. the sun-appserv-deploy task). This is what I think makes sense since asant is just a wrapper over asadmin.

We will get this fixed as part of