arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Password Recovery Ubuntu Server 18.04 LTS
#1
Password Recovery Ubuntu Server 18.04 LTS


Hello Post4VPS Community

In this brief guide I will provide instructions to perform a password recovery on a server or computer with Ubuntu 18.04 LTS or Ubuntu Server 18.04 LTS (it might as well work on older or newer versions). This information can be useful if you have forgot your root password. To perform the necessary steps you need to have VNC access or physical access to your server or computer.

Let's get started.


Step #1

Reboot your server or computer. When it is booting up hit the SHIFT key until you get into the GRUB boo tmenu. You migh need several tries depending on the hardware setup and how the OS was installed (Legacy vs UEFI and etc. can effect how the OS boots). It's a bit tricky especially if you're on modern and very fast hardware the OS boots really quick.

Once you are in GRUB it should look a bit like in the screenshot below (Ubuntu Server 18.04 LTS):
[Image: BCghVeA.png]


Step #2

In the GRUB boot menu select the Ubuntu entry and hit the E key to enable edit mode for the boot entry.

You will see the following screen:
[Image: mNsprJ0.png]

Navigate to the bottom of the file with the arrow keys until you see the following line:
linux /boot/vmlinuz-4.15.0-112-generic root=[...] ro maybe-ubiquity
^ This is an example from a Ubuntu Server 18.04 LTS VPS (might look different on a different machine).

Screenshot:
[Image: ImrywxW.png]

Change "ro maybe-ubiquity" to "rw init=/bin/bash".

Screenshot:
[Image: uAFSvZe.png]

After that press F10 to boot into single user mode with the new parameters that you've set above.


Step #3

You are now in single user mode and have a direct bash shell session open as the user "root" without the need to enter a password or something else.

Screenshot:
[Image: E9iAVdg.png]

Now simply run the password utility to change the password of the root user:
passwd

Enter a new password and confirm it.

Screenshot:
[Image: TBJKmJM.png]


Step #4

Reboot the server or computer to boot into the normal Ubuntu environment using the command below:
exec /sbin/init

Login with your new root password.


That's it! You have recovered or reset your lost root password. The same method can be used to reset other user passwords, too.
[Image: zHHqO5Q.png]


Messages In This Thread
Password Recovery Ubuntu Server 18.04 LTS - by Mashiro - 07-24-2020, 09:06 AM


person_pin_circle Users browsing this thread: 2 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting