{"id":5622,"date":"2016-04-01T09:51:28","date_gmt":"2016-04-01T01:51:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=5622"},"modified":"2016-04-01T09:51:28","modified_gmt":"2016-04-01T01:51:28","slug":"booting-into-single-user-mode-and-changing-root-password-centos-redhat-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5622","title":{"rendered":"Booting into single user mode and changing root password Centos \/ Redhat 7"},"content":{"rendered":"<p>During boot, press &#8220;<b>e<\/b>&#8221; at the grub loader.<br \/>\nScroll down using the arrow keys to the line starting with &#8220;linux&#8221;. It would look like this.<br \/>\nlinux16 \/vmlinuz-3.10.0&#8230;&#8230;<br \/>\nRemove the following from that line. &#8220;<b>rhgb<\/b>&#8221; and &#8220;<b>quiet<\/b>&#8220;.<br \/>\nAdd the following to the end of the line. &#8220;<b>init=\/bin\/sh<\/b>&#8220;.<br \/>\nPress<b> ctrl+x<\/b> to continue the boot process.<br \/>\nOnce the system is booted, you will be at the root user in single user mode. But this is in a read only file system.<br \/>\nYou need to mount the \/ filesystem.<br \/>\n<b>mount -o remount, rw \/<\/b><br \/>\nTest that you can write to \/, following command should work without error.<br \/>\n<b>touch \/tmp\/test<\/b><br \/>\nNow change your password for root<br \/>\n<b>passwd<\/b><br \/>\nTouch the following file to make sure things are ok on SELinux, this is a fix file process.<br \/>\n<b>touch \/.autorelabel<\/b><br \/>\nFinally start the normal boot process.<br \/>\n<b>exec \/sbin\/init<\/b><\/p>\n<p>You&#8217;re Done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During boot, press &#8220;e&#8221; at the grub loader. Scroll down using the arrow keys to the line starting with &#8220;linux&#8221;. It would look like this. linux16 \/vmlinuz-3.10.0&#8230;&#8230; Remove the following from that line. &#8220;rhgb&#8221; and &#8220;quiet&#8220;. Add the following to the end of the line. &#8220;init=\/bin\/sh&#8220;. Press ctrl+x to continue the boot process. Once the [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5622"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5622"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5622\/revisions"}],"predecessor-version":[{"id":5623,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5622\/revisions\/5623"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}