•  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

Password Reset - CentOS 7/8/9

  • Home
  • Client
  • Knowledgebase
  • Compute
  • cMetal
  • Password Reset - CentOS 7/8/9

Table Of Content

Related Articles

  • Protocol Management - Open/Close SMTP Port
  • Protocol Management - Intro
  • How to access your dedicated server IPMI?
  • How to obtain login information of your dedicated server in client area?
  • Views: (28)
  • Votes: (0)
Was this article helpful?
VOTE

Password Reset - CentOS 7/8/9

Publisher: Psychz Networks,  August 13,2025


How to Reset Root Password on CentOS 7/8/9

If you’ve lost or forgotten your root password on CentOS, you can reset it using IPMI and the GRUB bootloader.

This guide will walk you through the process step-by-step.

Prerequisites

  • IPMI access to your server
  • CentOS 7, 8, or 9 ISO (for rescue boot if required)
  • Basic familiarity with Linux command-line

Step 1: Connect to the IPMI

You will need to access your server’s IPMI interface to perform the reset. Refer to our guide on how to connect to IPMI: How to Access Your Dedicated Server via IPMI

Alternatively, you can download and use IPMIView from Supermicro: Download IPMIView


Step 2: Mount the ISO via IPMI

Booting your server into rescue mode by mounting the CentOS ISO. Refer to our guide here: How to Mount ISO via IPMI Management Web Interface


Step 3: Reboot and Access GRUB Menu

  1. If your system is currently running, reboot it via IPMI.
  2. When the GRUB boot menu appears, highlight the first boot entry.
  3. Press e to edit the selected entry.

Step 4: Edit the Kernel Boot Parameters

  1. In the GRUB editor, find the line starting with: linux16
  2. Navigate to the end of the line.
  3. Add:
rd.break

(Ensure there is a space before rd.break)

Example: linux16 /vmlinuz-3.10.0-327.28.3.el7.x86_64 root=UUID=xxxx ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8 rd.break


Step 5: Boot into Emergency Mode

  • Press Ctrl + X to boot with the modified parameters.
  • The system will boot into the initramfs prompt with a root shell.

Step 6: Remount the Root Filesystem with Write Permissions

By default, the root filesystem is mounted as read-only at /sysroot.

Remount it as read/write:

mount -o remount,rw /sysroot

Step 7: Enter chroot Environment

Change root into /sysroot so that commands affect the actual system:

chroot /sysroot

Step 8: Reset the Root Password

Run the passwd command:

passwd

Enter your new password twice when prompted.


Step 9: Update SELinux Relabel Timestamp

To ensure SELinux relabels the filesystem properly:

touch /.autorelabel

Step 10: Exit and Reboot

1.Exit the chroot environment:

exit

2.Exit the initramfs shell:

exit

The system will now reboot.


Step 11: Log In with the New Password

Once the system boots, you can log in as root using the new password.

You have successfully reset your CentOS root password.

Related Articles

  • Protocol Management - Open/Close SMTP Port
  • Protocol Management - Intro
  • How to access your dedicated server IPMI?
  • How to obtain login information of your dedicated server in client area?
  • Views: (28)
  • Votes: (0)
Was this article helpful?
VOTE
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