{"id":11802,"date":"2018-06-11T07:33:30","date_gmt":"2018-06-11T07:33:30","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=11802"},"modified":"2018-07-12T05:24:17","modified_gmt":"2018-07-12T05:24:17","slug":"reset-lost-root-password-in-windows-subsystem-for-linux","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/reset-lost-root-password-in-windows-subsystem-for-linux\/","title":{"rendered":"Reset Lost Root Password in Windows Subsystem for Linux"},"content":{"rendered":"<p>Forgot the root password after you&#8217;ve installed Ubuntu or Kali Linux subsystem on Windows 10? How can I reset it? Since the Fall Creators Update, you can run different Linux distribution directly on Windows 10 using a feature called &#8220;Windows Subsystem for Linux&#8221;. In this tutorial we&#8217;ll show you a simple way to reset lost root password for any Linux subsystem in Windows 10.<\/p>\n<p><strong>How to Reset Lost Root Password in Windows Subsystem for Linux<\/strong><\/p>\n<ol>\n<li>To open the terminal for your Linux instance on Windows 10, just click the Cortana search box in the taskbar, and then type the name of your Linux distribution (e.g. &#8220;<em>kali linux<\/em>&#8220;, &#8220;<em>ubuntu<\/em>&#8220;) to launch it.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/open-kali-linux-app.png\" alt=\"\" width=\"393\" height=\"453\" class=\"alignnone size-full wp-image-11795\" \/>\n<\/li>\n<li>Run the following command to find out the user ID of each Linux account.<br \/>\n<code>cat \/etc\/passwd<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/look-up-user-id-for-linux.png\" alt=\"\" width=\"596\" height=\"316\" class=\"alignnone size-full wp-image-11808\" \/><\/p>\n<p> \tAs you can see from the screenshot above, the root account has a user ID of 0. The account I&#8217;m using is named &#8220;<em>pcunlocker<\/em>&#8220;, and its user ID is 1000 (or 0x3e8 in hexadecimal).<\/li>\n<li>Now close the terminal and <a href=\"https:\/\/www.top-password.com\/blog\/6-ways-to-open-registry-editor-in-windows-10\/\" rel=\"noopener\" target=\"_blank\">open the Registry Editor<\/a>. Navigate to the following key:<br \/>\n<code>HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Lxss<\/code><\/p>\n<p> \tYou may see one or multiple subkeys named with the GUID of each Linux distribution. Navigate through each GUID key below that, noting the corresponding <strong>DistributionName<\/strong> on the right.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/linux-distribution-name.png.png\" alt=\"\" width=\"601\" height=\"294\" class=\"alignnone size-full wp-image-11817\" \/><\/p>\n<\/li>\n<li>When you find the GUID key of the Linux instance you want to reset root password for, double-click on the <strong>DefaultUid<\/strong> DWORD on the right-hand side and change it to 0 (root&#8217;s user ID).\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/DefaultUID.png\" alt=\"\" width=\"331\" height=\"199\" class=\"alignnone size-full wp-image-11810\" \/>\n<\/li>\n<li>Close Registry Editor and restart your Windows 10 machine.<\/li>\n<li>The next time you open the Linux app, it will launch the terminal as the root user. Type <strong>passwd<\/strong> and hit Enter, it will let you create a new root password.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/reset-linux-user-password.png\" alt=\"\" width=\"538\" height=\"190\" class=\"alignnone size-full wp-image-11811\" \/><\/p>\n<p> \tUse the &#8220;<strong>passwd user_name<\/strong>&#8221; command and you can reset forgotten password of any other Linux account.<\/li>\n<li>At this point you&#8217;ve successfully reset lost root password. Now open Registry Editor and go back to the previous registry key, change the value data of the <strong>DefaultUid<\/strong> back to the user ID of your default account.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/06\/linux-subsystem-registry.png\" alt=\"\" width=\"601\" height=\"294\" class=\"alignnone size-full wp-image-11809\" \/><\/p>\n<p> \tIn my example, I set the <strong>DefaultUid<\/strong> value back to &#8220;<em>1000<\/em>&#8221; (or <em>0x3e8<\/em> in hexadecimal) as I want Windows 10 to open the Linux terminal as the &#8220;<em>pcunlocker<\/em>&#8221; user by default.<\/li>\n<\/ol>\n<p>That&#8217;s it!<\/p>\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 the root password after you&#8217;ve installed Ubuntu or Kali Linux subsystem on Windows 10? How can I reset it? Since the Fall Creators Update, you can run different Linux distribution directly on Windows 10 using a feature called &#8220;Windows Subsystem for Linux&#8221;. In this tutorial we&#8217;ll show you a simple way to reset lost [&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,1894],"tags":[3870,3819,3871],"class_list":["post-11802","post","type-post","status-publish","format-standard","hentry","category-others","category-tips-tricks","category-windows-10","tag-forgot-linux-subsystem-password","tag-reset-linux-password-in-windows-subsystem","tag-reset-ubuntu-subsystem-password"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/11802","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=11802"}],"version-history":[{"count":11,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/11802\/revisions"}],"predecessor-version":[{"id":11818,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/11802\/revisions\/11818"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=11802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=11802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=11802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}