Home >System Tutorial >LINUX >Detailed tutorial on decrypting CentOS7 version system

Detailed tutorial on decrypting CentOS7 version system

PHPz
PHPzforward
2024-01-02 13:38:081192browse

1. Environment preparation:

The first thing is to have a CentOS7 system to ensure that it can restart normally and modify the configuration when booting.

2. Restart interface

1. Just entered the system

Detailed tutorial on decrypting CentOS7 version system

2. Press the up and down keys to select. You will not skip this interface directly. You will have time to do the operation. If you are fast, you can omit this sentence.

3. Then select the first item and press e to edit the selection.

3. Operation process

1. Enter the following interface

I installed this in a virtual machine, so the displayed content is a little small. You can use the up and down keys to turn pages.

Detailed tutorial on decrypting CentOS7 version system

2. Find the following information:

Find this or and replace or with rw init=/sysroot/bin/sh, leaving the rest unchanged.

Detailed tutorial on decrypting CentOS7 version system

3. After replacement, it will be as follows:

Delete or and replace it with the following content. This is the final result. The lower right corner of the red square is not the underline but the cursor. This needs to be noted.

Detailed tutorial on decrypting CentOS7 version system

4. After completing the above steps, you can directly press ctrl x to start in single-user mode.

5. Then you will enter the following pages

Detailed tutorial on decrypting CentOS7 version system

6. Enter the following content and then restart.

1), switch to a temporary system:

chroot: You can switch directly to a temporary system. This is just one of the functions of chroot. Specific detailed parameters, //m.sbmmt.com/link/fef98f01e3e52383bec61a7136d4ecb9

2), directly use passwd root to set the root user password:

The root password is not echoed and is required to be entered twice.

3). SELinux is not started now. Changes to all files may cause the document context (security context) to be incorrect. To ensure that the SELinux context is reset at startup, hidden files must be added in the root directory. autorelabel (if your system does not enable SELinux, you do not need to do this step).

Detailed tutorial on decrypting CentOS7 version system

ps: There is a step in the middle where you entered the wrong command, just ignore it.

4) Then just restart directly. I tried reboot and init 6, but they can't restart directly. Exit can't restart either. I just restarted like a power outage.

4. Finally, even if the root password is reset successfully.

PS: Only one method is used here to crack the root password,

5. Reference link:

Linux chroot command usage detailed explanation

The above is the detailed content of Detailed tutorial on decrypting CentOS7 version system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete