How to reset the root password in CentOS5Linux

Source: Internet
Author: User
1. when the boot starts, you can see the boot directory BootingCentOS (2.6.18-238. el5) in3seconds..., and then press "e ". 2. next, you can see the next screen and select "CentOS (2.6.18-238. el5), and then press "e3. next you can see another screen, there are three options root (hd0, 0) kernel/vmlinuz

1. when the boot starts, you can see the boot directory Booting CentOS (2.6.18-238. el5) in 3 seconds... and then press "e ".

2. next you can see the next screen, select "CentOS (2.6.18-238. el5), and then press" e"

3. next you can see another screen with three options root (hd0, 0) kernel/vmlinuz-2.6.18-238.el5 ro root = LABEL = rhgb quiet initrd/initrd-2.6.18-238.el5.img using the up/down cursor key, select the second (kernel/vmlinuz-2.6.18-238.el5 ro root = LABEL = rhgb quiet), and then press"

4. after performing the previous step, you can see the following figure grub edit> kernel/vmlinuz-2.6.18-238.el5ro root = LABEL =/rhgb quiet, add "space" after rhgb quiet, and then type "single ", or enter "1" of the number and press enter to confirm.

5. after completing the operation, the following screen appears: root (hd0, 0) kernel/vmlinuz-2.6.18-238.el5 ro root = LABEL = rhgb quiet 1 initrd/initrd-2.6.18-238.el5.img cursor selects the second option by default.

6. press "B" to reboot the system.

7. after the system is rebooted, the screen displays sh-3.2 #, the cursor stays behind, and then enter the passwd root command.
Changing password for user root.
New UNIX password: (enter the new password)
Retype new UNIX password: (the second time you enter the new password)
After the two passwords are consistent, the screen displays:
Passwd: all authentication tokens updatedsuccessfully.
Sh-3.2 #
Enter reboot after the cursor
Reboot the system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.