How to restore the root password under Slackware

Source: Internet
Author: User

Anyone can lose something, what if you lose the root password of your server?

It doesn't matter, we use the following method to recover.

Recovery method

Method One: Directly through the Lilo development init= "/bin/bash start to modify the password method two: through the CD-ROM boot, mount/partition, modify the/etc/shadow file to clear the password

Method One realization process starts Linux first, when Lilo appears, we press a button to let Lilo stop (don't press Enter OH)

This time will appear similar to the following picture

Here we see that there is only one system in the Lilo list, which is the system with the startup item name called Slack.

We enter the following command to start the system

Slack Init=/bin/bash RW

Note: The slack in our above command corresponds to the name of the startup item. What is the name of the system you set up in your Lilo, and replace it with what?

When the system enters the system, the following prompts appear

bash-3.00#, we'll type it after the prompt.

PASSWD in accordance with the instructions to us, enter two to three times the new password can be.

Because now the system is just a small kernel system, we do not do any other operation, and do not exit the shell with exit. After the password is modified, we use the following command to make/directory read-only

Mount-o REMOUNT,RW/

Now it's safe to reboot the system.

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.