•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

How to change root password in linux?

  • Home
  • Client
  • Qa Forum
  • How to change root password in linux?

Posted By: SHENGHUA | 1 Replies | Last Reply On: May 26, 2017 04:51:29

How do i go about changing root password in linux?  It would be nice to cover different distros. 
 

Psychz - Ganesh

Votes: 0Posted On: May 26, 2017 04:51:29
 

"Root" user is the default user with all rights. To change the Root password you need to log in as root in the command prompt and run the command "passwd". You can also run the command "su". The su (short for substitute user) command makes it possible to change a login session's owner (i.e., the user who originally created that session by logging on to the system) without the owner having to first log out of that session.

Here is a demonstration of how the Root password can be changed.

 

Prerequisites

1. Linux operating system (Ubuntu, CentOS, Debian etc) - In this case we are working on CentOS 7

2. Root permission

 

Changing the Root Password

1. Open the Terminal of your operating system. Log in as "root" by typing the command "su".

"su" is usually the simplest and most convenient way to change the ownership of a login session to root or to any other user.

 A password prompt will be displayed. Please type in your current password to log in as root.

 

 

2. After you have log in as root run the command "passwd". The command line will ask you for a new password. Enter the new password in the command prompt (Note : The password will not be displayed on the screen). After typing in the password you will be prompted to retype the password and your password will be changed.  

 

 

Was this reply helpful?

Related topics

  • How to update root document path for a website in cPanel?
  • How to change the password through Remote Desktop (RDP)
  • How to change user password in Linux?
  • Basic and useful Linux commands
  • How to change cpanel password from WHM?
  • Hosting With Root Access
  • Multi-Factor Authentication (MFA): A must for your account security!
  • Installing MariaDB on Centos 7
  • Top Encryption Software For Windows
  • Mirai DDoS attacks- Then and Now
  • Linux File Permissions Cheat Sheet
  • How to setup a dedicated server for Unturned
  • Unable to Access The Server Via SSH
  • Scientific Linux and its features
  • How to rsync two directories
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801