Have forgotten your admin credential or mess out with your server and trying to log in without success ?
To reset your password here is how you will do it.
1. Solution ONE:
Open your admin-keyfile located in C:\glassfishv3\glassfish\domains\domain1\config (C: or domain1 may be different, glassfishv[VERSION]).
replace the content with:
anonymous;{SSHA}WQVj8i9CLECCiv+w6ZxGgMrcfPqHPoXZW+2Jdw==;asadmin
# Domain User and Password - Do Not Delete Entry Above
Then restart your server !!!
2. Solution TWO:
In order to get a new admin-keyfile we will create a new domain, then copy it into our existing server.
Right your glassfish server :
Then add a new glassfish server
Then server name
then NEXT
Then domain name: domain2 , Finish button activates. Finish
Successfull message
Congratulation your new server with new domain name domain2 is created.
Now copy this file admin-keyfile located in C:\glassfishv3\glassfish\domains\domain2\config
(C: or domain1 may be different, glassfishv[VERSION]).
Replace the admin-keyfile of domain1 of with the new one from domain2.
Restart your server and enjoy !!!
3. Solution THREE:
As there never a two without three, here is another simple way of creating a new domain in order to obtain a new admin-keyfile for replacing the old one in our domain1. This time around we use the command line.
Go to the cmd and locate your glassfish installation directory.
cd C:\glassfishv3\bin
C:\glassfishv3\bin>asadmin create-domain --savemasterpassword domain2
Please just type enter to accept the default username and password !!!
After copying the newly created admin-keyfile in C:\glassfishv3\glassfish\domains\domain2\config
You may delete the new domain domain2. Using the following command.
C:\glassfishv3\bin>asadmin delete-domain domain2
and so was it!!!
To reset your password here is how you will do it.
1. Solution ONE:
Open your admin-keyfile located in C:\glassfishv3\glassfish\domains\domain1\config (C: or domain1 may be different, glassfishv[VERSION]).
replace the content with:
anonymous;{SSHA}WQVj8i9CLECCiv+w6ZxGgMrcfPqHPoXZW+2Jdw==;asadmin
# Domain User and Password - Do Not Delete Entry Above
Then restart your server !!!
2. Solution TWO:
In order to get a new admin-keyfile we will create a new domain, then copy it into our existing server.
Right your glassfish server :
Then add a new glassfish server
Then server name
then NEXT
Then domain name: domain2 , Finish button activates. Finish
Successfull message
Congratulation your new server with new domain name domain2 is created.
Now copy this file admin-keyfile located in C:\glassfishv3\glassfish\domains\domain2\config
(C: or domain1 may be different, glassfishv[VERSION]).
Replace the admin-keyfile of domain1 of with the new one from domain2.
Restart your server and enjoy !!!
3. Solution THREE:
As there never a two without three, here is another simple way of creating a new domain in order to obtain a new admin-keyfile for replacing the old one in our domain1. This time around we use the command line.
Go to the cmd and locate your glassfish installation directory.
cd C:\glassfishv3\bin
C:\glassfishv3\bin>asadmin create-domain --savemasterpassword domain2
Please just type enter to accept the default username and password !!!
After copying the newly created admin-keyfile in C:\glassfishv3\glassfish\domains\domain2\config
You may delete the new domain domain2. Using the following command.
C:\glassfishv3\bin>asadmin delete-domain domain2
and so was it!!!
Thanks! Creating the new domain and copying the admin-keyfile over worked. Phil
ReplyDeleteYou are welcome Jordan. Happy to hear that it works for you...
Deleteamzing
ReplyDeleteThank you very much:D
ReplyDeleteI would spent much more time solving this problem if I didn't find your site.
thank you buddy, great going
ReplyDeleteSolution ONE worked for me many thanks.
ReplyDeletenice and worked.. And visit my blog: https://ashik-programmer.blogspot.com
ReplyDeleteand be a follower. Thanks.
This great!
ReplyDelete