What's new

Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

How to Change the Root Password in Linux

aior

aior

Administrator
Staff member
How to Change the Root Password in Linux

Sometimes you need to change the root user’s password for security or administrative reasons. Below is a simple guide to do this on a standard Linux distribution, written in a XenForo-friendly format.

  1. Log in or Switch to the Root User
    If you are not already logged in as root, you can switch to the root account via su -:
    Bash:
    su -
    Enter the current root password when prompted. If you are already logged in as root, skip this step.
  2. Use the “passwd” Command
    To change the root password, simply run:
    Bash:
    passwd
    It will prompt you to enter a new password and then confirm it:


    Code:
    New password:
    Retype new password:

    Make sure you use a strong password (mix of letters, numbers, and special characters).
  3. Verify the Change
    Once the change is successful, you should see a message like:

    Code:
    passwd: all authentication tokens updated successfully
    From now on, the new password will be required whenever you or anyone else attempts to log in as root.
  4. B Switching Back to Normal User[/B]
    If you need to return to a regular, non-root account, just type:
    Bash:
    exit
    This will drop you back to your previous user session.

Additional Tips
If you are unable to log in as root normally, some distributions disable direct root logins by default. You may need to use sudo passwd root instead of switching to root first.
Always remember to secure and protect the root user’s password carefully, as it grants full system control.

That’s all there is to it—after running passwd, your root password on Linux is successfully changed.
 

Theme customization system

You can customize some areas of the forum theme from this menu

Choose the color that reflects your taste

Wide/Narrow view

You can control a structure that you can use to use your theme wide or narrow.

Grid view forum list

You can control the layout of the forum list in a grid or ordinary listing style structure.

Picture grid mode

In the grid forum list, you can control the structure where you can open/close images.

Close sidebar

You can get rid of the crowded view in the forum by closing the sidebar.

Fixed sidebar

You can make it more useful and easier to access by pinning the sidebar.

Corner radius close

You can use the radius at the corners of the blocks according to your taste by closing/opening it.

Back