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]
#2
whoahh nice! I didn't knew that!
If I'd ever forget the password then I at that time will install a new os.....
but this seems pretty interseting. Now I don't have to reinstall OS just to change the Passwd! Thnx @"Hidden Refuge" !
+1 Upvoted ! Smile
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#3
Thank you Hidden for a brief explanation.It is a very unique article on internet.Last night i have searched a lot on google duckduckgo but, i found nothing. found a single method but were unable to recover my password. i hope, i will not face this problem in future but if i, it will be very easy to recover password with your tutorial.

once again Thank you.

Thanks to Post4VPS and Hostlease for their great services.  
#4
Excellent tutorial @"Hidden Refuge". It's so heartening to see that you're contributing even though you're very busy. Smile

This tutorial is precise and to the point. I really liked the way you explain things with the help of an example image. Thanks for this!
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#5
Please guys.  If you wish to thank the author of the tutorial you may do so with the rate tool.  Please do not post thank you posts as they are considered spam, and off topic.  Only create a post if you wish to contribute to the contents of the OP, i.e. want to ask something of substance, or add insights to the contents of the tutorial.

Any further thank you posts after this one will be removed from the forum.
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  



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