Linux forgot root password how to hack?

Source: Internet
Author: User

If you forget the administrator root password, and there are no other known administrator users on the system, then how to do?

is to find a way to crack the root password, the Linux system can forget the password to reset the root password, the following is the process of cracking:

1, restart or open the Linux system, and then boot the time is known to press the E key until the kernel selected interface:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A1/wKioL1RVsXPCynlsAADk8zMKyFw163.jpg "title=" 1.jpg " alt= "Wkiol1rvsxpcynlsaadk8zmkyfw163.jpg"/>

2, then press the E key on the keyboard, the following interface will appear:

Root (hd0,0): Indicates the hard disk and hard disk partition where the kernel resides, and will cause the system to fail to boot if modified

kernel/vmlinux-3.14.22 ro Root=uuid ... is the compressed kernel, followed by the kernel parameters

Initrd/initramfs-3.14.22.img virtual file system, responsible for loading drivers, etc.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A1/wKioL1RVseWB1jO2AAGRcQ9gRH0108.jpg "title=" 1.jpg " alt= "Wkiol1rvsewb1jo2aagrcq9grh0108.jpg"/>

3, move the mouse down to the middle line that is kernel/vmlinuz-3.14.22, and then click E

Then press the SPACEBAR to enter a space, enter a number 1, press ENTER to confirm, confirm and press B to restart, wait a moment, and then automatically enter into single user mode:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A2/wKiom1RVtxzRgMShAADaowgQCqI271.jpg "title=" 1.jpg " alt= "Wkiom1rvtxzrgmshaadaowgqcqi271.jpg"/>

4, first execute Setenforce 0 selinux off, otherwise the password modification is unsuccessful, and then use passwd root reset password can be,

After the direct reboot reboot the host can enter the system with the new password.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A2/wKiom1RVt_TzFF-lAAEg21Y_wPU400.jpg "title=" 1.jpg " alt= "Wkiom1rvt_tzff-laaeg21y_wpu400.jpg"/>


5, so the password has been modified, but this will also lead to others to modify their own password, too not too safe, then how to prevent others to change the password?

You can use the Grub-md5-crypt password to generate the MD5 string, and then write the/etc/grub/grub.conf join a line password--md5 youpasswd prevent others from cracking their own passwords as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A1/wKioL1RVutyRBRQDAABFG_U2Z5U387.jpg "title=" 1.jpg " alt= "Wkiol1rvutyrbrqdaabfg_u2z5u387.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A2/wKiom1RVuvjCmZ-HAAHlmbIhC2Y267.jpg "title=" 1.jpg " alt= "Wkiom1rvuvjcmz-haahlmbihc2y267.jpg"/>

6, restart the system again to try to crack the password, this time will prompt press p to enter the password just set to enter the kernel interface to crack root password:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A2/wKiom1RVvNGCu1g9AADiTDI84IU186.jpg "title=" 1.jpg " alt= "Wkiom1rvvngcu1g9aaditdi84iu186.jpg"/>


But this still can not be completely guaranteed password can not be cracked, because if others use the system CD-ROM boot system, can still be in the system rescue mode to change the password, so need to ensure their server hardware security, in addition to the system security enough to ensure that their system security, The root password cannot be obtained by others by other means.


So how to use the CD-ROM boot in rescue mode to remove the encryption of the grub.conf file?

See another blog < rescue repair mode to hack the root password >

This article is from the "Linux" blog, so be sure to keep this source http://zhangshijie.blog.51cto.com/806066/1570901

Linux forgot root password how to hack?

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.