CENTOS7&CENTOS6 root password hack detailed

Source: Internet
Author: User

CENTOS7&CENTOS6 root password hack detailed

When it comes to Linux root login password, I believe that as an operations manager is a sensitive issue, if the administrator forgot the root login password, need to crack the words is and is convenient, not like Windows login password hack, Password hack for Windows login we need to intervene tools to hack, now the most used is the old peaches and other tools. And today we mainly introduce the CENTOS7 and cenos6 password of the hack method. The use of Centos7 children's shoes is experienced, Centos7 and CENTOS6 version of the command is a certain difference, the most significant firewall type, from iptables to Firewalld, such as CENTOS6 restart the service command format for services Iptables stop, and Centos7 's command format is Systemctl stop firewalld.service, such as Centos6 chkconfig off iptables to systemctl disable Firewalld.service, change Chkconfig iptables on to Systemctl enable Firewalld.serivce, of course, crack centos6.x and Centos7 password method is not the same, specifically see below:

The first is the CentOS 6.x root password hack method: Power on Press ESC

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image002" src= "http://s3.51cto.com/wyfs02/M00/71/57/wKiom1XLYeaAeRydAAHCoLbmzro542.jpg" height= "528"/>

Press "E" to enter edit mode

Then choose kernel/vmlinuz-2.6.32 ... Also press "E" to edit this mode

650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image004" src= "http://s3.51cto.com/wyfs02/M01/71/57/wKiom1XLYeaShVdEAAIheFys7_E552.jpg" height= "530"/>

After entering edit mode, we enter "simple" or "1" after quiet

650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image006" src= "http://s3.51cto.com/wyfs02/M02/71/57/wKiom1XLYeqjfzDpAAGw_g6J68I600.jpg" height= "525"/>

Enter "1" after we return to the edit mode, then we press "B" into the single user mode

650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image008" src= "http://s3.51cto.com/wyfs02/M00/71/57/wKiom1XLYerBXPqsAAIMDJz-rrI571.jpg" height= "531"/>

After you press "B" into single-user mode, we can

passwd Root

Change the password.

Enter two times New password enter

650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image010" src= "http://s3.51cto.com/wyfs02/M01/71/57/wKiom1XLYerw875uAAFxndgFcXw982.jpg" height= "413"/>

Then we

Reboot

Perform a system restart

650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image012" src= "http://s3.51cto.com/wyfs02/M02/71/53/wKioL1XLY-6SLAxCAAFgUaEJMvw371.jpg" height= "405"/>

After rebooting, we can log in with a new password

650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image014" src= "http://s3.51cto.com/wyfs02/M00/71/53/wKioL1XLY_GjERQvAAFB1Zcc9Zk777.jpg" height= "407"/>

Next, let's talk about Centos7 's Hack method.

Click on the Boot

Esc

650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image016" src= "http://s3.51cto.com/wyfs02/M01/71/53/wKioL1XLY_GDCvmRAAFRRQkQkTw667.jpg" height= "402"/>

We move the bottom by moving the anti-directional keyboard

linux16/vmlinuz-3.10.0-229.e17x86_64 root-/dev/mapper/centos-root ro\ rd.lvm.lv-centos/root modified result is Linux16/ vmlinuz-3.10.0-229.e17x86_64 root-/dev/mapper/centos-root RW init=/sysroot/bin/sh rd.lvm.lv-centos/root

650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://s3.51cto.com/wyfs02/M02/71/57/wKiom1XLYe6j8H76AAHeHfwCcJU691.jpg" height= "403"/>

We need to

Ro modified to RM init=/sysroot/bin/sh

650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image020" src= "http://s3.51cto.com/wyfs02/M01/71/57/wKiom1XLYe_TbynCAAIFSpidHU0113.jpg" height= "415"/>

Then we execute

Ctrl+x

Enter single-user mode

650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image022" src= "http://s3.51cto.com/wyfs02/M00/71/57/wKiom1XLYe_AXVO0AAIJNHORcgo802.jpg" height= "413"/>

650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://s3.51cto.com/wyfs02/M01/71/57/wKiom1XLYfPB8PnOAAFofrOeYNU045.jpg" height= "407"/>

Change the program root directory:

Chroot/sysroot

650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image026" src= "http://s3.51cto.com/wyfs02/M02/71/57/wKiom1XLYfOgXV7NAAFS77qN-u0340.jpg" height= "409"/>

Reset Password:

passwd Root

650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image028" src= "http://s3.51cto.com/wyfs02/M00/71/57/wKiom1XLYfPgCO0BAAGUCF7wK5w674.jpg" height= "402"/>

Update System Information:

Touch/.autorelabel

650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image030" src= "http://s3.51cto.com/wyfs02/M02/71/53/wKioL1XLY_eCgdTSAAGYP-PbOuY548.jpg" height= "408"/>

Exit Chroot:

Exit

650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image032" src= "http://s3.51cto.com/wyfs02/M02/71/53/wKioL1XLY_rjNARyAAGhBKBlAJw808.jpg" height= "409"/>

Restart the system:

Reboot

650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image034" src= "http://s3.51cto.com/wyfs02/M02/71/57/wKiom1XLYfeSwB3YAAGKIwVUnjs729.jpg" height= "399"/>

Login successful with new password after reboot

650) this.width=650; "title=" clip_image036 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image036 "src=" http://s3.51cto.com/wyfs02/M00/71/53/wKioL1XLY_vxtJTCAAEubralWhk601.jpg "height=" 406 "/>

This article from "Gao Wenrong" blog, reproduced please contact the author!

CENTOS7&CENTOS6 root password hack detailed

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.