• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to reset forgot root password in CentOS 6.x and Redhat 6.x

January 2, 2014 by Sharad Chhetri Leave a Comment

In this practical we will learn,how to reset forgot root password in CentOS 6.x and Redhat 6.x.
We are doing this practical in CentOS 6.x and it is also applicable to Red Hat 6.x.To reset the root password we will boot the linux system in Runlevel 1 also known as single user mode.

Note: The method is applicable if grub password is not. If you have grub password set then you will not be able to follow the steps which we will describe in this post.We will discuss about grub password in next upcoming post.

To reset forgot root password in CentOS 6.x and Redhat 6.x,follow the given below steps

Step 1: Boot your CentOS/Red Hat linux system and press esc key when you see the message “Press any key to enter the menu” .

reset centos redhat password

Step 2: Now select your operating system if it is dual/multiple boot.Because I have only one Operating system installed,hence selecting CentOS.Now press “e” key from your keyboard. As shown in below given screenshot.

reset-centos6-password-step2

Step 3: Now with the help of arrow key move to second line where “kernel /vmlinuz- “ has been written. And after this press “e” key

reset-centos6-password-step3

Step 4: Now as per given below screenshot. Only give a space and type numeric 1 . And after this press ENTER key

reset-centos6-password-step4

Step 5: Now you are back to the previous screen. Now press “b” key to boot the system and wait for a few seconds/minutes.

reset-centos6-password-step5

reset-centos6-password-step6

Step 6:
Now by-default root is logged in. The runlevel is 1 (It is also known as single user mode)
Now reset the password by below given command

 passwd root

After resetting the password,now restart the system by command

init 6

reset-centos6-password-step7

Step 7: Let the system get boot normally. After a short time,you will see the login screen. give your new root password and get log in.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Forgot root password ,Reset it in Run level 1
  2. CentOS 7 / RHEL 7 : Reset / Recover forgotten root password
  3. How to set root password on Ubuntu / Debian / Linux Mint
  4. Set and reset user password by bash script
  5. ghost blog reset password and activate user from sqlite
  6. How to increase Password Expire date without resetting the password
  7. How to Install awstat in Redhat and CentOS
  8. How to change hostname or FQDN in CentOS and Redhat
  9. How to install mysql server in RedHat and CentOS
  10. Linux: Set user password by using encrypted password in command

Filed Under: Tips And Tricks Tagged With: reset root password

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to convert float to integer number

How to zip directory in linux explained with examples

rsync all files,hidden files,symlinks,hardlinks to remotes Linux Server

GNU Screen

find command to search keyword in files recursively in linux

error could not configure a c compiler Linux

WordPress host IP changed not able to open wp-admin and site page looks scattered

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy