Multiple posture hack CentOS OR readhat Enterprises 7.X Root Password

Source: Internet
Author: User

No:1

start the system, press "E" key in the Grub interface, go to edit mode, find the line starting with "linux16", add "Rd.break" at the end of the row, and press "Ctrl X" to start: # Mount -o remount,rw/sysroot # #以读写方式挂载/sysroot#chroot /sysroot # #切换根目录 #Echo  "liuqi.com"| passwd --stdin root#touch /. Autorelabel  # #设置开机后重标记SElinux标签 #exit

No:2

Start the system, press "E" key in the Grub interface, enter edit mode, find the line that starts with "linux16" to replace the RO with RW init=/sysroot/bin Press Ctrl x to start: #chroot /sysroot/ # Echo " liuqi.com "| passwd --stdin root#touch /. Autorelabel#exit#reboot

No:3

Start the system, press "E" key in the Grub interface, enter the edit mode, find the line that starts with "linux16" to replace the RO with RW, and add init=/bin/sh   Press CTRL x to start: #Echo  "liuqi.com"| passwd --stdin root#touch /. Autorelabel#exit#reboot

No:4 (recommended)

Start the system, in the grub interface by pressing "E" key, enter the editing mode, find the "linux16" beginning of the row Ro replaced with RW, line  end add init=/bin/sh  /etc/ /sbin/init system restarts, you do not need to use a password to log in, enter the system and then use passwd to modify the root password. 

Multiple posture hack CentOS OR readhat Enterprises 7.X Root Password

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.