Home > HowTo, Linux, Security > Centos 7 change root passwd

Centos 7 change root passwd

February 7th, 2017 Leave a comment Go to comments

How to change root password on Centos 7

  1. reboot press ESC to go into menu, then press ‘e’ to edit
  2. change line of Linux 16 and change ro with rw init=/sysroot/bin/sh
  3. CRTL-X to boot
  4. chroot /sysroot
  5. passwd root
  6. touch /.autorelabel
  7. reboot -f

Troubleshooting try after step 3:

    mount -o remount,rw /
    cp /etc/shadow- /etc/shadow
Categories: HowTo, Linux, Security Tags:
  1. No comments yet.
  1. No trackbacks yet.
What is 4 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

*