2017 m. kovo 20 d., pirmadienis

CentOS 7 root recovery

https://www.liberiangeek.net/2014/09/reset-forgotten-root-password-centos-7-servers/Changing root password on centos 7

Next, scroll down to the list until you see the line underlined below ( ro ) . What we need to do is change that ro to rw and start into a bash shell. It should look like this rw init=/sysroot/bin/sh.

forgotten root password on centos 7

Change the ro line to rw and add init=/sysroot/bin/sh

changing root password on centos

After changing that, press Control + X  or Ctrl + X  on your keyboard to start into single user mode using the bash shell specified above. In this mode, we’re going to change the root password.

In the single user mode, run the command as shown below

chroot /sysroot

password change on centos 7

Finally, run the commands below to change the root password.

change password on centos 7

You’ll be prompted to create and confirm a new password.  After creating the password, run the commands below to update SELinux parameters

touch /.autorelabel

Komentarų nėra:

Rašyti komentarą