{"id":5219,"date":"2015-10-04T11:35:52","date_gmt":"2015-10-04T03:35:52","guid":{"rendered":"http:\/\/rmohan.com\/?p=5219"},"modified":"2015-10-04T11:35:52","modified_gmt":"2015-10-04T03:35:52","slug":"reset-root-password-core-os-redhat-linux","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5219","title":{"rendered":"Reset Root Password core OS Redhat Linux"},"content":{"rendered":"<p>To reset the root password of your server, you will need to boot into single user mode.<\/p>\n<p>Access the Manage section of your server in the customer portal and follow these steps. The option depends on the bootloader version on the machine:<\/p>\n<p>CentOS 6<br \/>\nClick [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.<br \/>\nYou will see a GRUB boot prompt telling you to press any key &#8211; you have only a few seconds to press a key to stop the automated booting process. (If you miss this prompt you will need to restart the VM again)<br \/>\nAt the GRUB prompt, type &#8220;a&#8221; to append to the boot command.<br \/>\nAdd the text &#8220;single&#8221; and press enter.<br \/>\nSystem will boot and you will see the root prompt. Type &#8220;passwd&#8221; to change the root-password and then reboot again.<br \/>\nDebian, Ubuntu, CentOS 7<br \/>\nClick [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.<br \/>\nAs soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.<br \/>\nYou will see a GRUB boot prompt &#8211; press &#8220;e&#8221; to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)<br \/>\nFind the kernel line (starts with &#8220;linux \/boot\/&#8221;) and add init=&#8221;\/bin\/bash&#8221; at the end of the line<br \/>\nPress CTRL-X or F10 to boot.<br \/>\nSystem will boot and you will see the root prompt. Type &#8220;mount -rw -o remount \/&#8221; and then &#8220;passwd&#8221; to change the root password and then reboot again.<br \/>\nFreeBSD<br \/>\nThe boot menu has an option to boot into single-user mode. Press the key for single user mode (2). At the root prompt, type &#8220;passwd&#8221; to change the root password and then reboot again.<\/p>\n<p>CoreOS<br \/>\nCoreOS by default uses SSH key authentication. On Vultr, a root user and password are created. If an SSH key is selected when creating the VPS, this SSH key can be used to login as user &#8220;core&#8221;.<\/p>\n<p>It is possible to reset the standard root login by executing &#8220;sudo passwd&#8221; as user &#8220;core&#8221;. Login as &#8220;core&#8221; using the SSH key first.<\/p>\n<p>If you lost your SSH key, then you can login as the &#8220;core&#8221; user by editing the grub loader. Follow these steps:<\/p>\n<p>Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.<br \/>\nYou will see a GRUB boot prompt &#8211; press &#8220;e&#8221; to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)<br \/>\nAt the end of the line that begins with &#8220;linux$&#8221; add &#8221; coreos.autologin=tty1&#8243; (no quotes).<br \/>\nPress CTRL-X or F10 to boot. You will be logged in as &#8220;core&#8221; when the system boots.<br \/>\nRemember to reboot your server after you have reset your login.<br \/>\nRead more at: https:\/\/www.vultr.com\/docs\/boot-into-single-user-mode-reset-root-password<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To reset the root password of your server, you will need to boot into single user mode.<\/p>\n<p>Access the Manage section of your server in the customer portal and follow these steps. The option depends on the bootloader version on the machine:<\/p>\n<p>CentOS 6 Click [View Console] to access the console and click the send [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5219"}],"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=5219"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5219\/revisions"}],"predecessor-version":[{"id":5220,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5219\/revisions\/5220"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}