CentOS7/Redhat7 cracking Root password (linux)

In our study of Linux, cracking root passwords may not be the most commonly used skill, but if you need to crack it, it may be too late to learn. As a result, the first item in the Red Hat certification exam is the cracking of the Root password. Therefore, the following will provide a solution suitable for the CentOS 7/Redhat 7 system to crack the Root password.

Applicable system: CentOS 7 or Redhat 7 operating system

Other versions or other Linux operating systems may not be suitable for this method, please try with caution and do not use it in a production environment at will

Steps##

1. When starting the operating system, quickly press the e key

Second, modify the kernel startup interface###

Find the "Linux16......" line on the kernel startup page, adjust the cursor to the end of this paragraph**, delete from back to front ** to the next space after ro, and set "ro "After changing to "rw", leave a space and enter "rd.break"

Note: rw followed by a space is not /, here it is displayed as / due to line change, and after the space, enter rd.break (for details, please see the red font in the figure below)

Three, enter the single user mode through ctrl+x execution

Four, modify password

Run the following commands in sequence (as shown below)

chroot sysroot
echo 000000| passwd --stdin root  //Set password (here set to 000000)
touch /.autorelabel
exit
exit  //The system will start after the second exit

Five, the modification is successful

Wait for the system to restart and use the newly set root password to log in to the system


Operation video##

https://asfor-cn.oss-cn-beijing.aliyuncs.com/server_video/%E7%A0%B4%E8%A7%A3root%E5%AF%86%E7%A0%81%E6%93%8D%E4%BD%9C%E8%A7%86%E9%A2%91.mp4

Recommended Posts

CentOS7/Redhat7 cracking Root password (linux)
Root password cracking under CentOS 7
CentOS 7 Root user password reset
Linux ubuntu...root initial password setting
ubuntu root default password (initial password)
Linux basics (root privileges in Ubuntu)