users@glassfish.java.net

Re: Windows service asks for admin password when starting

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Wed, 15 Aug 2007 13:29:26 -0400

Thanks for the useful information. Yes it is interesting. Earlier today
I was reading some of the Sun docs on this very subject.

The Glassfish website shows a few simple commands that you can run to
get it installed, which includes a setup.xml or setup-cluster.xml
(depending on which you want). I don't think many people will be
editing this file before installing? My tool is to be used after
you've completed the installation on Windows. All it does is create a
windows service, and optionally a password.txt file so that
installations with the cluster profile will start unattended. It is now
working great, but I do not like the plain text password stored in
password.txt.

I get the impression that for unattended Windows service startup, the
password must be stored in plain text in a file and the asadmin command
needs to know where this file is. There is no support for a hashed
password in the file.


Thanks,
Ryan

glassfish_at_javadesktop.org wrote:
> Yes, it is possible. The trick lies in creating the domain. Remember, creation of a domain works
> in concert with starting it. If you make the provisions during creation, startup of domain will be
> facilitated. I encourage you to do some experiments and then you'll see some real goodies in GlassFish:
>
> 1- Remove ~/.asadminpass (~ refers to your home folder).
> -- "asadmin crate-domain --adminport 4848 foodomain". Observe that no ~/.asadminpass is
> created.
> -- now do: "asadmin crate-domain --adminport [b]--savelogin[/b] 4848 foodomain. Observe that
> ~/.asadminpass is created! This file contains the encoded admin user and password and its
> access permissions are set to 600 (on Unix platforms, where [i]chmod[/i] works). Note: The
> password is NOT encrypted/hashed.
>
> 2- Now start the domain.
> -- In case of no ~/.asadminpass, the start-domain command would prompt you for admin
> user and password for a domain that's cluster aware.
> -- In case of ~/.asadminpass, the start-domain will look for the relevant entry in
> ~/.asadminpass and use the admin user and password from there!
>
> 3. ~/.asadminpass can contain admin user and password for multiple domains. The entries are
> keyed on admin server's host name and admin port number (e.g. localhost, 4848).
>
> 4. Not all domains are born same :). A domain that does not deal with clusters (e.g. the so-called
> developer profile domain) is not required to have any admin user and password at the
> [i]startup[/i]. A domain with cluster support, on the other hand, requires admin user and password
> at the startup so that it can communicate with other entities in the domain (e.g. node-agent).
>
> Moderately interesting, eh?
>
> Regards,
> Kedar
> [Message sent by forum member 'km' (km)]
>
> http://forums.java.net/jive/thread.jspa?messageID=230977
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>