GUI-based centos5.5 system root user forgot password solution

Source: Internet
Author: User
I haven't been tossing the VM on my computer for a long time. if I want to test something on the VM, I forgot the root user password. To see what the linux system looks like, I installed a virtual machine in my own book. But I am used to window interface users, so I installed a window with easy to use for the first time.

I haven't been tossing the VM on my computer for a long time. if I want to test something on the VM, I forgot the root user password.

To see what the linux system looks like, I installed a virtual machine in my own book. But I am used to window interface users, so I installed the CentOS 5.5 system with an interface for the first time.

Okay. now let's begin to introduce the solution for the root user to forget the password.

Step 1:When centos5.5 is started, press "space" on the keyboard until the system menu gnu grub appears. The interface is as follows:[There is no centos interface by default, and the system menu is invisible. In fact, the system menu is loaded. for example, press ctrl + alt + delete on windows to enter the bios setting interface]

Step 2:Go to the step 1 page and press "e" to go to the edit GRUB page [select your own based on the up and down arrow keys, similar ]. For example:

Step 3: Go to step 2. press "e" to go to the editing page, add "space" after rhgb quiet, and then type "single ", or enter "1" of the number and press enter to confirm. [This figure is not truncated, o (too many) o], press enter to confirm, and then enter the figure in step 2 grub again, but rhgb quiet, and then enter the corresponding command.

Step 4: continue to press "e" to enter the editing interface -- set the new password interface sh-3.2 # command [in, my Chinese characters are garbled]

Step 5: enter passwd root after sh-3.2 # command

Enter the password twice. if the entered password is too short, a prompt is displayed.

If the authentication is successful, for example, run the sh-3.2 # command and enter reboot to restart the system.

At this point, it is done, even if the password is forgotten, it is not afraid. [Hey, save my password: testroot]

By the way: sh-3.2 # if passwd root forgets another user name, this is also the case. For example, if another account is lhy, passwd lhy

For several records in CentOS 5.5, refer to the blog "linux Series".

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: 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.