Rescue mode after a serious fault occurs in the Linux operating system

Source: Internet
Author: User
1. Insert the system installation disc, restart the machine, and quickly press the Del key during startup to enter the CMOS, and change the startup sequence to the disc to start first. in this way, the Linux installation program is started, and press F5, follow the prompts

1. Insert the system installation disc, restart the machine, and quickly press the Del key during startup to enter the CMOS, and change the startup sequence to the disc to start first. in this way, the Linux installation program is started, and press F5, press the prompt to enter the Linux rescue and press enter to enter the rescue mode. Next, select the language and keyboard and press enter directly. The program prompts that the Linux system on the hard disk has been installed under/mnt/sysimage, then a super user prompt is displayed.

2. go to The etc directory on the hard disk: cd/mnt/sysimage/etc. do the backup first to prevent unexpected events:

Cp shadow. old modify the properties of the shadow file to writable: chmod + w shadow and then use vi to modify it: Find the row containing the root user information: root :.... :, the first two colons are the encrypted password, delete it (the colon cannot be deleted), and save the disk to exit. In this way, the root password is blank.

If you do not use vi, you can use the following method: Find a DOS disk and insert it into the floppy drive. copy the Shadow to the DOS disk: mcopy shadow a:/and then modify it with the notepad in the attachment in Windows, note that you must select all files (*..

Last copied back: mcopy a:/shadow mnt/sysimage/etc

3. change the Shadow attribute back to read-only: chmod-w shadow. finally, enter Exit to Exit and retrieve the disc.

4. to ensure security, add the password to the root user in the terminal window after restart.

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.