Lodaer Img

Change Password in Linux if password is lost

If you’ve lost or forgotten your Linux password, don’t worry—you can regain access to your system by resetting the password. This guide will walk you through the steps to reset a lost password on a Linux server or VPS. Whether you’re managing a dedicated server or a virtual private server (VPS), these steps will help you regain control quickly.

Steps to Reset a Lost Password in Linux

1. Reboot the System

First, you need to reboot your Linux server or VPS. If you’re using a dedicated server, you can do this via the physical console or a remote management tool like IPMI. For a VPS, use the reboot option in our VPS control panel.

2. Access GRUB Menu

During the reboot process, you’ll need to access the GRUB (Grand Unified Bootloader) menu. To do this:

  • As soon as the system starts booting, press and hold the Shift key (for BIOS systems) or the Esc key (for UEFI systems) to bring up the GRUB menu.

3. Edit the Boot Entry

  • In the GRUB menu, select the Linux kernel you want to boot and press the e key to edit the boot entry.
  • Look for the line that starts with linux or linux16 or linuxefi (depending on your system).
  • Append the following to the end of that line:
  • rw init=/bin/bash

This will boot the system into a single-user mode with root privileges.

4. Boot into Single-User Mode

  • After editing the boot entry, press Ctrl + X or F10 to boot the system.

  • The system will boot into a root shell without requiring a password.

5. Reset the Password

  • Once in the root shell, you can reset the password for any user. For example, to reset the password for the user admin, run:

     
    passwd admin
  • You’ll be prompted to enter a new password and confirm it. Make sure to choose a strong, secure password.

6. Remount the Filesystem as Read-Write

  • Before rebooting, ensure the filesystem is mounted as read-write to save the changes:

     
    mount -o rw,remount /

"These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammeled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every.!"

Cherry Cruuz

7. Reboot the System

Some SEO-related tools such as the Google Keyword Planner and Google Analytics provide quantitative data to help you understand your market, analyze the trends, and know your competitors’ standings. It helps you identify popular and valuable keywords so you can decide how to structure or revise your content.

7. Reboot the System

    • Finally, reboot the system to apply the changes:

exec /sbin/init

or
reboot

 

8. Log in with the New Password

  • After the system reboots, log in using the new password you set.

Important Notes

  • Security: Always ensure your server is secure after resetting the password. Update all passwords and review access controls.

  • Physical Access: For dedicated servers, physical access or remote management tools like IPMI are required to perform these steps.

  • VPS Users: If you’re using a VPS, check your hosting provider’s control panel for a built-in password reset option, as some providers offer this feature for convenience.

Why Choose Our Dedicated Servers and VPS?

At Kwik Server, we understand the importance of reliable server management. Our dedicated servers and VPS hosting solutions come with robust support and easy-to-use management tools, ensuring you can focus on your business without worrying about technical hurdles. Whether you need a high-performance dedicated server or a scalable VPS, we’ve got you covered.

By following these steps, you can easily reset a lost password on your Linux server or VPS. If you have any questions or need assistance, our support team is always here to help. Explore our range of dedicated servers and VPS hosting plans to find the perfect solution for your needs.

Why Kwik Server is most preferred hosting provider?

  • Instant VPS provisioning through modules
  • Option to restart or reinstall OS in a single click
  • VPS and Dedicated servers have port 25 open by default
  • Round the clock customer support through Live Chat and SkyPe
  • Distinguished provider of affordable AMD, Ampere and Intel Servers
  • Storage Servers at unbelievable low cost and expandable upto 96TB
  • Top ranked Encoding RDP provider with unmatched powerful servers in the industry
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *