{"id":2981,"date":"2013-08-10T02:56:29","date_gmt":"2013-08-10T02:56:29","guid":{"rendered":"http:\/\/www.top-password.com\/blog\/?p=2981"},"modified":"2013-08-10T03:13:43","modified_gmt":"2013-08-10T03:13:43","slug":"reset-forgotten-root-password-on-vmware-esxi-5-and-esxi-4","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/reset-forgotten-root-password-on-vmware-esxi-5-and-esxi-4\/","title":{"rendered":"Reset Forgotten Root Password on VMware ESXi 5 and ESXi 4"},"content":{"rendered":"<p>Forgot your VMware ESXi Server root password? Try to log on to your ESXi server but for some reason your root password isn&#8217;t working anymore? Here we&#8217;ll show you a way to reset forgotten root password on VMware ESXi 5 and ESXi 4. But this trick is not officially supported by VMware, so do it on your own risk.<\/p>\n<p><strong>How to Reset Forgotten Root Password on VMware ESXi 5 and ESXi 4?<\/strong><\/p>\n<ol>\n<li>First of all, you need to boot your ESXi server with a Linux live CD. I prefer <a href=\"http:\/\/www.grml.org\/\" rel=\"nofollow\" target=\"blank\">GRML<\/a>, but any live CD will do. Of course, you can also boot from a USB stick.<\/li>\n<li>Find the partition containing a file named &#8220;state.tgz&#8221;. For my installation, it was on a VFAT\u00a0filesystem labelled &#8220;Hypervisor3&#8221;, which is accessible in GRML\u00a0at &#8220;\/mnt\/Hypervisor3&#8221;. You might need to mount it manually with the command\n<p><code>mount \/mnt\/Hypervisor3<\/code><\/li>\n<li>Unpack the &#8220;state.tgz&#8221; file somewhere. It contains exactly one file, which is another archive named &#8220;local.tgz&#8221;.\n<p><code>cd \/tmp<br \/>\ntar xzf \/mnt\/Hypervisor3\/state.tgz<\/code><\/li>\n<li>Unpack the &#8220;local.tgz&#8221;, and find an &#8220;etc&#8221; directory containing several configuration files.\n<p><code>tar xzf local.tgz<\/code><\/li>\n<li>Edit the file etc\/shadow to change the password.\n<p><code>vi etc\/shadow<\/code><\/p>\n<p>Probably the easiest way is to replace the line starting with &#8220;root&#8221; with the line of another user account of which you know the password. You only need to change the name at the beginning of the line (before the first colon) to &#8220;root&#8221;. You&#8217;ve then set the root password to a password you know.<\/p>\n<p>Alternatively, you can just remove the hash altogether (everything between the first and the second colon) and login to the service console as root with no password at all.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2013\/08\/vmware-esxi-password.png\" alt=\"vmware-esxi-password\" width=\"431\" height=\"122\" class=\"alignnone size-full wp-image-2985\" \/><\/p>\n<\/li>\n<li>Re-pack the files and move the modified state.tgz back to the VFAT partition. Probably it is a good idea to make a backup copy of the original state.tgz in case something goes wrong:\n<p><code>mv \/mnt\/Hypervisor3\/state.tgz \/mnt\/Hypervisor3\/state.tgz.bak<br \/>\nrm local.tgz<br \/>\ntar czf local.tgz etc<br \/>\ntar czf state.tgz local.tgz<br \/>\nmv state.tgz \/mnt\/Hypervisor3\/<\/code><\/li>\n<li>Reboot back into ESXi and you&#8217;re done.<\/li>\n<\/ol>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Forgot your VMware ESXi Server root password? Try to log on to your ESXi server but for some reason your root password isn&#8217;t working anymore? Here we&#8217;ll show you a way to reset forgotten root password on VMware ESXi 5 and ESXi 4. But this trick is not officially supported by VMware, so do it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10],"tags":[1504,1505,1503,1501],"class_list":["post-2981","post","type-post","status-publish","format-standard","hentry","category-others","category-tips-tricks","tag-forgot-vmware-esxi-password","tag-reset-esxi-root-password","tag-reset-vmware-esxi-password","tag-vmware-esxi"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/2981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=2981"}],"version-history":[{"count":4,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/2981\/revisions"}],"predecessor-version":[{"id":2986,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/2981\/revisions\/2986"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=2981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=2981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=2981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}