{"id":1662,"date":"2013-07-01T14:32:58","date_gmt":"2013-07-01T14:32:58","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1662"},"modified":"2013-07-01T14:32:58","modified_gmt":"2013-07-01T14:32:58","slug":"resetting-a-forgotten-root-password-in-centos","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1662","title":{"rendered":"Resetting a Forgotten Root Password in Centos"},"content":{"rendered":"<p>Resetting a Forgotten Root Password<\/p>\n<p>If you have forgotten the root password it is possible to set a new one as follows:<\/p>\n<p>Interrupt the boot at the GRUB stage and boot to runlevel 1, AKA single user mode. Interrupt GRUB by typing a character such as &#8220;space&#8221; then append to the kernel line by typing &#8220;a&#8221;, backspacing through &#8220;rhgb quiet&#8221; and appending &#8221; 1<enter>&#8220;. This will give you a root shell and not a login prompt. From there you can use the &#8220;passwd&#8221; command to set a new root password.<\/p>\n<p>Other user passwords can be reset, and other administrative tasks can be performed as well. Exiting the single user root shell will boot to the multi-user mode defined in \/etc\/inittab.<\/p>\n<p>CentOS-6 Note: Due to an upstream SELinux bug the root password cannot be reset on a fresh install of CentOS-6 without an additional step. Booting with &#8220;selinux=0&#8221; appended to the grub kernel line, or doing &#8220;setenforce 0&#8221; after logging in and before attempting to reset the password are work-arounds. This is corrected by applying already-released errata updates.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Resetting a Forgotten Root Password If you have forgotten the root password it is possible to set a new one as follows: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1662","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1662"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1662\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}