This article will teach you how to reset a forgotten root password from the GRUB menu. The instructions should work on the following operating systems:
First, login to GleSYS Cloud and navigate to the virtual machine in question.
The next step is to reboot the server. You can do that by clicking Reboot
in the dropdown menu called Actions or by opening a Console
from the same place and pressing Ctrl-Alt-Del
in the console view.
Picture below: When rebooting, the GRUB menu will appear, and to edit the boot parameters of the server, press key 'e.' If you are running Ubuntu 18.04, you need to press and hold Shift when rebooting for the GRUB menu to appear.
Picture below: This is your current boot parameters. Step down to the second last text line starting with 'linux' and delete ro
and everything that comes after (quiet
in our case, but others could, for example, also have no_timer_check
there).
Picture below: You replace this with rw init=/bin/bash
. Then press Ctrl-X or F10 to boot up the server.
Now you can run the command passwd
to set a new root password and then run exec /sbin/init
to reboot the server one last time.
root@(none):/# passwd
Output
New password:
Retype new password:
passwd: password updated successfully
root@(none):/# exec /sbin/init
Finally, test the newly reset password once the login screen shows up!
Kontakta oss gärna för mer information. Vi hjälper dig att komma fram till den bästa lösningen för dina behov.