Linux system related, forgot root password

Source: Internet
Author: User
Tags md5 encryption

Linux Boot Sequence

MBR will load bootloader (GRUB)

GRUB is the abbreviation for the Grand Unified Bootloader (Multi-os boot manager).
The grub configuration file is: grub.conf configuration overrides the system kernel load
Set Grub MD5 encryption command: Grub-md5-crypt
Password = plaintext or Password--md5 ciphertext

The system starts and loads the INIT program:

Init configuration file/etc/inittab

decided to use that RunLevel run level 0~~6

Common shutdown Commands:

Shutdown-h now
Halt
Poweroff
Init 0

Common Restart Commands:

Shutdown-r now
Reboot
Init 6

Forgot root Password reset method:

Single-user mode modifies the user's password:

Restart

Press E, edit

Enter the interface

Add init/bin/sh as location and delete Rheb section, press CTRL X

Login is successful, you can change the root password

Enter the following command (re-mount the pair to be read and write)

Modify the passwd file directly

As below, you can directly remove the password and save, log in and then make changes

Linux system related, forgot root password

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.