{"id":1600,"date":"2013-07-26T02:07:53","date_gmt":"2013-07-26T00:07:53","guid":{"rendered":"http:\/\/www.switchbl8.nl\/blog\/?p=1600"},"modified":"2013-07-26T02:07:53","modified_gmt":"2013-07-26T00:07:53","slug":"reset-a-glassfish-password","status":"publish","type":"post","link":"https:\/\/www.switchbl8.nl\/blog\/2013\/07\/reset-a-glassfish-password\/","title":{"rendered":"Reset a GlassFish password"},"content":{"rendered":"<p>I don&#8217;t use my local GlassFish much, so of course: I lost the admin password. Here&#8217;s a simple method to be able to log in again.<\/p>\n<p>Start asadmin from the $GLASSFISH\/bin folder.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nasadmin&gt; list-domains\r\ndomain1 not running\r\nCommand list-domains executed succesfully.\r\n<\/pre>\n<p>Next create a domain that does not exist yet. Supply an admin user and password that you can remember!<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nasadmin&gt; create-domain\r\nEnter the value for the domain_name operand&gt; dummy\r\nEnter admin user name &#x5B;Enter to accept default &quot;admin&quot; \/ no password]&gt; admin\r\nEnter the admin password &#x5B;Enter to accept default of no password]&gt; ******\r\nEnter the admin password again&gt; ******\r\nUsing default port 4848 for Admin.\r\nUsing default port 8080 for HTTP Instance.\r\n...\r\nDomain dummy created.\r\nDomain dummy admin port is 4848.\r\nDomain dummy admin user is &quot;admin&quot;.\r\nCommand create-domain executed successfully.\r\nasadmin&gt;\r\n<\/pre>\n<p>Now go to the config folder of domain dummy ($GLASSFISH\/glassfish\/domains\/dummy\/config). There is a file admin-keyfile. Copy this file to the config folder of your original domain, e.g. domain1 ($GLASSFISH\/glassfish\/domains\/domain1\/config). Make sure you make a backup of the original admin-keyfile first.<\/p>\n<p>Confirm that you can log in as admin again. If so, you can safely delete the dummy-domain:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nasadmin&gt; delete-domain dummy\r\nDomain dummy deleted.\r\nCommand delete-domain executed successfully.\r\nasadmin&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t use my local GlassFish much, so of course: I lost the admin password. Here&#8217;s a simple method to be able to log in again. Start asadmin from the $GLASSFISH\/bin folder. asadmin&gt; list-domains domain1 not running Command list-domains executed succesfully. Next create a domain that does not exist yet. Supply an admin user and <a href='https:\/\/www.switchbl8.nl\/blog\/2013\/07\/reset-a-glassfish-password\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[106,61,76],"class_list":["post-1600","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-glassfish","tag-java-2","tag-security","category-1-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/comments?post=1600"}],"version-history":[{"count":4,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1600\/revisions"}],"predecessor-version":[{"id":1604,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1600\/revisions\/1604"}],"wp:attachment":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/categories?post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}