How to reset Root Password in OS level on Linux Cloud Servers

2020-08-18 By Ryan 4274 Views linux password root
3 reviews

The root is the username or account that, by default, has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user, and superuser.


This guide outlines the steps to reset root passwords inside the OS level in the Linux server (E.g. CentOS, Ubuntu and Debian).


  1. First access server by using SSH with the current password and run the below command to change the password.

    # passwd root
    

    *It will ask to Enter the new UNIX password as shown in the below image.

    rootreset1

  2. Now enter the new strong password and retype it in the next step and press Enter.

    rootreset2

  3. Now you can use the new password. If you need to generate a strong password, then run the below command from the server before trying to change the password. Here using SHA to hash the date, runs through base64, and then outputs the top 20 characters.

    # date +%s | sha256sum | base64 | head -c 20 ; echo
    

    rootreset3


Related Tutorials

What do you think about this article?

Rate this article
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.