{"id":12303,"date":"2021-11-24T04:59:14","date_gmt":"2021-11-24T04:59:14","guid":{"rendered":"https:\/\/linuxways.net\/?p=12303"},"modified":"2021-11-24T04:59:14","modified_gmt":"2021-11-24T04:59:14","slug":"how-to-reset-a-forgotten-root-password-in-debian-10-11","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-reset-a-forgotten-root-password-in-debian-10-11\/","title":{"rendered":"How to Reset a Forgotten Root Password in Debian 10\/11"},"content":{"rendered":"<p>It\u2019s not uncommon for users to forget their root password. This happens especially when you stay for prolonged periods without using logging in or switching to root user. In case you have forgotten your root password, fret not. You can reset it in a few simple steps.<\/p>\n<p>Let\u2019s now see how you can reset a forgotten root password in Debian 10 or 11. For demonstration. We will use Debian 11.<\/p>\n<h2><strong>Edit the GRUB menu settings<\/strong><\/h2>\n<p>To get started, reboot your Debian system, and on the first boot entry as indicated below, press \u2018<strong>e<\/strong>\u2019 on the keyboard to access the GRUB editor.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"472\" class=\"wp-image-12304\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-436.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-436.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-436-300x223.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/strong><\/p>\n<p>You should be able to see a couple of lines on the editor like what we have here. Using your arrow down key, scroll down until you get to the line that begins with \u2018<strong>linux<\/strong>\u2019. Using the arrow forward key , navigate to the end of the line.<\/p>\n<p>Be sure to delete the \u2018<strong>ro quiet<\/strong>\u2019 attributes.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"482\" class=\"wp-image-12305\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-437.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-437.png 643w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-437-300x225.png 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/strong><\/p>\n<p>Once deleted, enable access to the bash shell by typing <strong>init=\/bin\/bash<\/strong><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"479\" class=\"wp-image-12306\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-438.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-438.png 640w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-438-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/strong><\/p>\n<p>Next, press <strong>ctrl + x <\/strong>to boot into single-user mode.<\/p>\n<h2><strong>Reset the password in single-user mode<\/strong><\/h2>\n<p>Once you have accessed the single-user shell, mount the root filesystem with read and write access as follows:<\/p>\n<pre><strong># mount -o remount,rw \/<\/strong><\/pre>\n<p>Therefore, reset the root password by typing the command:<\/p>\n<pre><strong># passwd<\/strong><\/pre>\n<p>Enter your preferred root password and confirm. While at it, ensure that you provide a strong root password to avoid easily falling victim of bruteforce or dictionary attacks.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"226\" class=\"wp-image-12307\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-439.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-439.png 700w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/11\/word-image-439-300x97.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/strong><\/p>\n<p>To effect the changes, exit the single-user mode and reboot by typing <strong>CTRL + ALT + DEL<\/strong> on the keyboard.<\/p>\n<p><strong>NOTE:<\/strong><\/p>\n<p>The fact that you can change the root user password implies that someone else who might have physical access to your PC or server can do the same and compromise your system. To prevent this, you can enable a BIOS password or alternatively, encrypt your filesystem with a password so that no one else can access the system without the password.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Great, you can now use the newly created password to log in or switch to your root user account. We hope that this guide was helpful in helping you reset your root password.<\/p>","protected":false},"excerpt":{"rendered":"<p>It\u2019s not uncommon for users to forget their root password. This happens especially when you stay for prolonged periods without using logging in or switching to root user.&hellip;<\/p>","protected":false},"author":1,"featured_media":12395,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17,521,215,697],"class_list":["post-12303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-debian-10","tag-debian-11","tag-password","tag-root"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=12303"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/12395"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=12303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=12303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=12303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}