Retrieve password in CentOS 6.4 and RHEL6.X Single User Mode

Source: Internet
Author: User

Retrieve password in CentOS 6.4 and RHEL6.X Single User Mode

In CentOS 6.4 and RHEL6.X single-user mode, you can retrieve the password. When you start the system, the system prompts "enter any key to enter the menu (press any key to enter menu in English)". press enter.

The "CentOS (2.6.32-358. e16.i686)" menu appears.
The following message is displayed: Enter 'e' to edit the commands before booting.

Therefore, we enter the 'E' character, and the following three options will appear on the interface:
Root (hd0, 0)
Kernel/vmlinuz -...
Initrd/initramfs...

Select "kernel..." and press "e:
<BOARDTYPE = pc KEYTABLE = us rd_NO_DM rhgb quiet
Enter "single" at the end of this line (Note: There is a space before single), press enter,
This will return to the interface with the three options (the second item is still selected), and then press 'B '.

Then wait. The operating system is started. No Password is required during this period! The command line is displayed as follows:
Root@www.bkjia.com/] #


Now we can run the command as root.

Change Password:

  • (A) For CentOS 6.4, run the "passwd" command to change the password!
  • (B) The RHEL 6.x, "passwd" command is invalid!
Run the following command:
Echo 'ybxiang123 '| passwd -- stdin root
The password is changed to 'ybxiang123'


Restart with "init 6!

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: info-contact@alibabacloud.com 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.